-
Notifications
You must be signed in to change notification settings - Fork 123
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
Remove support for author-added focus-ring class #35
Comments
The issue with this: // always show focus outline around a specifc control
button.default-action:focus {
outline: solid 2px blue;
} is that there is no way to recover the default focus style. |
@alice you didn't address my original point, which is once support for the actual That aside, authors wishing to restore the browser's default focus style could apply a class to the html element identifying the UA, hide the focus ring by setting the
|
We can restore :not(:focus-ring):focus {
outline-width: 0;
}
.some-override:focus {
outline-width: medium;
} Removing non-spec syntactical sugar will make developer’s lives easier later. In my experience, they will always come to rely on your non-spec sugar. |
alice and I discussed this and agree that we can remove the attribute and update the recommendations to use |
I added an issue to discuss the "always match focus ring" thing: #42 |
I think this issue was resolved with #36. Closing. |
Filing up as a followup from the discussion in issue #33 pertaining to the need for the
data-focus-ring-added
attribute. As of 8d00580 this polyfill supports persistence of instances of an author-definedfocus-ring
class. I would argue this should be removed on the premise that:This polyfill shouldn't give authors abilities they won't have with the actual :focus-ring psuedo. Therefore, once actual support for :focus-ring lands in browsers the only change authors need to make to their CSS is changing their rules from .focus-ring to :focus-ring. Hence, more with the grain.
Should authors wish to ensure specific instances of UI always show focus they can leveraging the natural cascade and/or specificity rules in CSS:
The text was updated successfully, but these errors were encountered: