-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
New Rule: no-important #20
Comments
As with #19, a {
"rules": {
"no-restricted-syntax": [
"error",
{
"selector": "Declaration[important!=true]",
"message": "!important annotations are not allowed."
},
]
}
} When using cascade layers, the
Fewer people will likely want to restrict this syntax as they adopt cascade layers. |
Yeah, I think we want to hold off on adding rules that simply disallow syntax because it can easily be covered by |
I was excited about that one but reading the comments makes me doubt now 😀. I believe @jeddy3's view on these is super interesting, I personally have 0 background on CSS linting so following your advice seems like the best idea to me! |
@jeddy3 is this true for keyframe https://stylelint.io/user-guide/rules/keyframe-declaration-no-important/ |
Rule details
Flag the use of !important
What type of rule is this?
Warns about a potential problem
Example code
Participation
Additional comments
Needing
!important
indicates there may be a larger underlying issue.The text was updated successfully, but these errors were encountered: