-
Notifications
You must be signed in to change notification settings - Fork 37
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
Utility classes: which classes should have an !important
annotation on their declaration?
#2284
Comments
PolariTOON
changed the title
Utility classes: which classes should have an annotation on their declaration?
Utility classes: which classes should have an Nov 9, 2022
!important
annotation on their declaration?
Yes. We "cloned" what we have seen in bootstrap. And in bootstrap all utilities are If you check the git history, you'll see that we had |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We sometimes use
!important
to increase the specificity of some declarations made by utility classes. This has the advantage to help us override some styles set by MUI.Not every utility class annotates its declarations with
!important
though. We currently have it for dimensions (u-w*
,u-h*
) but not for some display utility classes for example.What is the rationale behind putting it on some declarations but not on others? Should we put
!important
everywhere? Or investigate other ways to increase specificity such as inline styles or@layer
rules?The text was updated successfully, but these errors were encountered: