-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(components): menu item only changes color on focus-visible
#2327
Changes from all commits
eb7223c
41eb838
16c2527
5ef8a10
78f57a4
07a41ef
3f6d447
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,24 +65,28 @@ | |
|
||
.action { | ||
display: flex; | ||
gap: var(--menu-space); | ||
width: 100%; | ||
padding: var(--menu-space); | ||
border: none; | ||
border-radius: var(--radius-base); | ||
outline: transparent; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Beacuse we're using box-shadow on focus, this sets outline to transparent so that high-contrast modes still work. |
||
text-align: start; | ||
background-color: transparent; | ||
cursor: pointer; | ||
gap: var(--menu-space); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This re-order happened via auto-fix |
||
align-items: center; | ||
transition: | ||
background-color var(--timing-base) ease-in, | ||
box-shadow var(--timing-base) ease-in; | ||
} | ||
|
||
.action:hover, | ||
.action:focus { | ||
.action:focus-visible { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. focus-visible respects browser heuristics for what should and not be focused |
||
background-color: var(--color-surface--hover); | ||
} | ||
|
||
.action:focus-visible { | ||
outline-color: var(--color-focus); | ||
box-shadow: var(--shadow-focus); | ||
} | ||
.action span { | ||
/* match appearance of Button labels */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/GetJobber/atlantis/pull/2327/files#r1924437738