fix(ui): use focus-visible instead of focus to prevent sticky hover effect on click (#10651)

This commit is contained in:
Rahul A Mistry
2026-01-26 22:28:29 +05:30
committed by GitHub
parent 984518b1c0
commit 783121c06e
6 changed files with 9 additions and 9 deletions

View File

@@ -46,7 +46,7 @@
&:hover:not(:disabled) {
background-color: var(--surface-raised-base-hover);
}
&:focus:not(:disabled) {
&:focus-visible:not(:disabled) {
background-color: var(--surface-raised-base-hover);
}
&:active:not(:disabled) {

View File

@@ -90,8 +90,8 @@
/* color: var(--icon-hover); */
/* } */
}
&:focus:not(:disabled) {
background-color: var(--surface-focus);
&:focus-visible:not(:disabled) {
background-color: var(--surface-raised-base-hover);
}
&:active:not(:disabled) {
background-color: var(--surface-raised-base-active);

View File

@@ -40,7 +40,7 @@
transition: opacity 0.15s ease;
&:hover:not(:disabled),
&:focus:not(:disabled),
&:focus-visible:not(:disabled),
&:active:not(:disabled) {
background-color: transparent;
opacity: 0.7;
@@ -91,7 +91,7 @@
transition: opacity 0.15s ease;
&:hover:not(:disabled),
&:focus:not(:disabled),
&:focus-visible:not(:disabled),
&:active:not(:disabled) {
background-color: transparent;
opacity: 0.7;

View File

@@ -31,7 +31,7 @@
}
}
&:not([data-expanded]):focus {
&:not([data-expanded]):focus-visible {
&[data-variant="secondary"] {
background-color: var(--button-secondary-base);
}