-
Notifications
You must be signed in to change notification settings - Fork 99
ENH Update focus states to be consistent #2089
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
base: 3
Are you sure you want to change the base?
ENH Update focus states to be consistent #2089
Conversation
| display: inline; | ||
|
|
||
| &:focus { | ||
| &:focus-visible { |
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.
focus-visible lets the browser decide when the focus outline is displayed. This means our styles are more inline with browser defaults 👍
| //$btn-box-shadow: inset 0 1px 0 rgba($white,.15), 0 1px 1px rgba($black,.075) !default; | ||
| //$btn-focus-box-shadow: 0 0 0 3px rgba($primary, .25) !default; | ||
| $btn-box-shadow: none; | ||
| $btn-focus-box-shadow: none; |
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.
Removing a bunch of drop shadows in favour of the new focus outline
| * ----------------------------------------------------------------- */ | ||
| .breadcrumbs-wrapper { | ||
| width: 250px; // to enable flexbox auto-grow | ||
| overflow: hidden; |
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.
This was originally added in #304.
I tried adding a bunch of pages, some with long names, and didn't experience any difference with this vs without it - except that without it the focus outline displays correctly for links at the edges of the wrapper boundaries.
Here's a screenshot of my test, note it looked like this both with and without hiding the overflow.
3672cf1 to
a5db5dd
Compare
a5db5dd to
1afeb0d
Compare
This PR uses CSS variables to set focus outline style, colour, width, and offset.
This has a few advantages over relying directly on SCSS variables:
outline-*CSS properties, which means the specificity remains very broad, making targetted updates very easy.This PR updates all
focus-visiblestyling to be consistent. Broadly speaking:Issue