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
Add "outline-none" and "shadow-outline" utilities #491
Conversation
Ship it! |
What do you think about naming them |
All box shadow utilities have to start with |
src/generators/outline.js
Outdated
|
||
export default function() { | ||
return defineClasses({ | ||
'no-outline': { outline: '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.
Bootstrap uses outline: 0
for theirs, not sure if it really matters but when there are multiple ways to do things I think it's a good idea to use precedent from a huge project with tons of users. Saves a couple bits in the compiled CSS too I guess.
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.
Yep, okay, will update.
@adamwathan Yeah, true. It would be nice to have all outline-related classes with the |
@DCzajkowski Yeah I don't really mind calling it @reinink What do you think about removing the tabindex outline styles from preflight mentioned in #427 as part of this PR? I figure it's more flexible to make that behavior opt-in by writing |
Also as part of this PR, we might want to consider enabling the Also wondering, if you apply .no-outline {
outline: none;
}
// vs.
.focus\:no-outline:focus {
outline: none;
} |
Yup, totally.
I've never done it that way before. |
Okay, updated:
|
This is an alternative to #490, and implements what I suggested in #56 (comment).
outline-none
utility.shadow-outline
. Since box-shadows are more useful than outlines in CSS (mostly because they respect border-radius), it makes more sense to use them than real CSS outlines.focus
variant for shadows and outlines by default.tabindex="-1"
outline style from Preflight.Closes #56
Closes #385
Closes #427