From f6f2349f8cbb86531f0d76ce74d0886f9a8706d7 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 12 Aug 2024 12:41:13 +0800 Subject: [PATCH] Add `:focus-visible` style to buttons (#31799) (#31819) Backport #31799 by @silverwind Buttons now show a focus style via [`:focus-visible`](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible) when the browser deems the focus to be important, like for example when the button is focused via keyboard navigation. Screenshot 2024-08-07 at 22 12 51 image Co-authored-by: silverwind --- web_src/css/modules/button.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web_src/css/modules/button.css b/web_src/css/modules/button.css index 4e133852f1..c4addd05f0 100644 --- a/web_src/css/modules/button.css +++ b/web_src/css/modules/button.css @@ -24,6 +24,10 @@ white-space: nowrap; } +.ui.button:focus-visible { + box-shadow: inset 0 0 0 2px currentcolor; +} + @media (max-width: 767.98px) { .ui.button { white-space: normal;