From ecd2c320ba101f4b2fd3e1c9b115f063f62737b6 Mon Sep 17 00:00:00 2001 From: Tharun Rajendran Date: Mon, 19 Jul 2021 19:47:45 +0530 Subject: [PATCH] GlobalStyle: Add focus style for links (#36533) * GlobalStyle: Add focus style for links * GlobalStyle: show focus style only on visible --- packages/grafana-ui/src/themes/GlobalStyles/elements.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/grafana-ui/src/themes/GlobalStyles/elements.ts b/packages/grafana-ui/src/themes/GlobalStyles/elements.ts index 1d4db822f4b..49f8f4d6dc5 100644 --- a/packages/grafana-ui/src/themes/GlobalStyles/elements.ts +++ b/packages/grafana-ui/src/themes/GlobalStyles/elements.ts @@ -1,5 +1,6 @@ import { css } from '@emotion/react'; import { GrafanaTheme2, ThemeTypographyVariant } from '@grafana/data'; +import { getFocusStyles } from '../mixins'; export function getElementStyles(theme: GrafanaTheme2) { return css` @@ -124,6 +125,10 @@ export function getElementStyles(theme: GrafanaTheme2) { outline: none; } + &:focus-visible { + ${getFocusStyles(theme)} + } + &: [disabled] { cursor: default; pointer-events: none !important;