Skip to content

Commit f6f2349

Browse files
GiteaBotsilverwind
andauthored
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. <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"> Co-authored-by: silverwind <[email protected]>
1 parent a39fe53 commit f6f2349

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: web_src/css/modules/button.css

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
white-space: nowrap;
2525
}
2626

27+
.ui.button:focus-visible {
28+
box-shadow: inset 0 0 0 2px currentcolor;
29+
}
30+
2731
@media (max-width: 767.98px) {
2832
.ui.button {
2933
white-space: normal;

0 commit comments

Comments
 (0)