-
-
Notifications
You must be signed in to change notification settings - Fork 41
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(CSS): outline
doesn't handle some keyword values
#299
Fix(CSS): outline
doesn't handle some keyword values
#299
Conversation
Now `outline` works well with CSS-wide keywords and all `outline-style` keywords.
@lesha1201 is attempting to deploy a commit to the Aoyue Team on Vercel. A member of the Team first needs to authorize it. |
const outlineGlobalValuesRegex = | ||
/^(?:inherit|initial|revert|revert-layer|unset)$/i |
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.
These values are applicable for all CSS properties but decided to keep it here while it's used only in this place.
@lesha1201 You move fast, and I was just about to fix that issue 😂 |
@1aron Sorry, didn't notice an assignee. Feel free to edit or close this PR as you want. |
@lesha1201 No, you did a good job, and I'll merge it as soon as possible and make some tweaks 💯 |
@lesha1201 The final solution may be to preset the outline and border styles in *,
::before,
::after {
border: 0 solid;
outline: 0 solid;
} If you want to keep accessibility: :focus {
outline: 2px solid blue;
outline-offset: 2px;
} Applying that approach will result in less CSS generated. |
@1aron It's ok to have it for By the way, modern browsers uses |
@lesha1201 Yep, the default outline styles for most elements: If we could make sure that the above is the default behavior of all elements, then just reset focus outline again in @master/normal.css: *,
::before,
::after {
border: 0 solid;
outline: 0 solid;
}
:focus-visible {
outline: -webkit-focus-ring-color auto 1px;
} |
Now
outline
works well with CSS-wide keywords and alloutline-style
keywords.Fixes #296
List of CSS-wide keywords:
outline
spec:outline-style
spec: