aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-08-12 02:40:18 +0200
committerGitHub <noreply@github.com>2024-08-12 00:40:18 +0000
commit63c5ac6cdb6cf9da136839c2db3b3848d84f62d0 (patch)
tree66c1df1a2bd326022e245d769b4250ee420ce772 /web_src
parent64ef3898e094d88d94b35c42e2a5092325eeab24 (diff)
downloadgitea-63c5ac6cdb6cf9da136839c2db3b3848d84f62d0.tar.gz
gitea-63c5ac6cdb6cf9da136839c2db3b3848d84f62d0.zip
Add `:focus-visible` style to buttons (#31799)
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. <img width="492" alt="Screenshot 2024-08-07 at 22 12 51" src="https://github.com/user-attachments/assets/060568b1-1599-4c56-bafb-b36ebb1bec35"> <img width="479" alt="image" src="https://github.com/user-attachments/assets/885f4e10-f496-47f0-8ae5-45827ded09f8">
Diffstat (limited to 'web_src')
-rw-r--r--web_src/css/modules/button.css4
1 files changed, 4 insertions, 0 deletions
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;