-
Notifications
You must be signed in to change notification settings - Fork 9
fix: add box shadow instead of outline for all focusable elements and some spacing to the elements #552
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
fix: add box shadow instead of outline for all focusable elements and some spacing to the elements #552
Changes from 1 commit
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 |
|---|---|---|
| @@ -1,3 +1,11 @@ | ||
| :root { | ||
| --outline-color: #{$outline-color-light}; | ||
| } | ||
|
|
||
| [data-theme="dark"] { | ||
| --outline-color: #{$outline-color-dark}; | ||
| } | ||
|
|
||
| html, | ||
| body { | ||
| height: 100%; | ||
|
|
@@ -66,3 +74,33 @@ main { | |
| background-color: $label-error-bg; | ||
| } | ||
| } | ||
|
|
||
| //Outline styles | ||
| .search:focus-within, | ||
| .btn:focus, | ||
| .btn:active, | ||
| .btn:focus:hover, | ||
| a:focus-visible, | ||
| summary:focus-visible { | ||
| outline: none; | ||
| box-shadow: 0 0 0 3px var(--outline-color); | ||
| border-radius: 2px; | ||
| transition: box-shadow 0.2s ease; | ||
| } | ||
|
Member
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. Confirmed fix of C.f. James' original comment and screenshots in #534. (Also apparent in the video!) |
||
|
|
||
| .aux-nav .aux-nav-list-item { | ||
| padding: 5px; | ||
| } | ||
|
|
||
| .nav-list-item { | ||
| padding-left: 1px; | ||
| padding-right: 1px; | ||
| } | ||
|
|
||
| .js-toggle-dark-mode { | ||
| height: 100%; | ||
| } | ||
|
|
||
| .js-toggle-dark-mode-wrapper { | ||
| padding: 5px; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,12 @@ | |
| $blue-400: #4da6ff; | ||
| $green-700: #00755c; | ||
| $red-600: #d13c3c; | ||
| $purple-500: rgba(215, 186, 255, 0.65); | ||
|
Member
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. Out of interest why
Contributor
Author
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. Sure. I used
Member
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. Thanks for the explanation! |
||
| $lavender: #b69cff; | ||
|
|
||
| // Semantic mappings | ||
| $link-color-dark: $blue-400; | ||
| $label-success-bg: $green-700; | ||
| $label-error-bg: $red-600; | ||
| $outline-color-light: $lavender; | ||
| $outline-color-dark: $purple-500; | ||


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.
I would tend to put a space here