diff options
| author | Rahul A Mistry <[email protected]> | 2026-01-26 22:28:29 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-26 10:58:29 -0600 |
| commit | 783121c06e388c2d496fd68c59421fdff7d5620f (patch) | |
| tree | 609bec899ef8bd0d31c520806e886e7d25382e3c /packages/ui/src | |
| parent | 984518b1c0cb74db0b8eb9f77bb15fb97224a4e2 (diff) | |
| download | opencode-783121c06e388c2d496fd68c59421fdff7d5620f.tar.gz opencode-783121c06e388c2d496fd68c59421fdff7d5620f.zip | |
fix(ui): use focus-visible instead of focus to prevent sticky hover effect on click (#10651)
Diffstat (limited to 'packages/ui/src')
| -rw-r--r-- | packages/ui/src/components/button.css | 2 | ||||
| -rw-r--r-- | packages/ui/src/components/icon-button.css | 4 | ||||
| -rw-r--r-- | packages/ui/src/components/list.css | 4 | ||||
| -rw-r--r-- | packages/ui/src/components/select.css | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/packages/ui/src/components/button.css b/packages/ui/src/components/button.css index 6922d996f..225e64c77 100644 --- a/packages/ui/src/components/button.css +++ b/packages/ui/src/components/button.css @@ -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) { diff --git a/packages/ui/src/components/icon-button.css b/packages/ui/src/components/icon-button.css index 7d5d3280f..aa550e990 100644 --- a/packages/ui/src/components/icon-button.css +++ b/packages/ui/src/components/icon-button.css @@ -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); diff --git a/packages/ui/src/components/list.css b/packages/ui/src/components/list.css index 03166285b..154102ca3 100644 --- a/packages/ui/src/components/list.css +++ b/packages/ui/src/components/list.css @@ -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; diff --git a/packages/ui/src/components/select.css b/packages/ui/src/components/select.css index 3e175855b..25dd2eb40 100644 --- a/packages/ui/src/components/select.css +++ b/packages/ui/src/components/select.css @@ -31,7 +31,7 @@ } } - &:not([data-expanded]):focus { + &:not([data-expanded]):focus-visible { &[data-variant="secondary"] { background-color: var(--button-secondary-base); } |
