-
Notifications
You must be signed in to change notification settings - Fork 718
[css-!] Abbreviated form of !important
, to simply !
#7538
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
Comments
Which utility frameworks do this, and should they do this? |
Maybe you are not familiar with Utility first (not only, but first) CSS. Using the CSS cascade is fine for document type webpages or small sites, less so for large app like websites. The question is not which utility first don't use it, but which don't. How about the website you are browsing right now, github.com use https://github.githubassets.com/assets/primer-665d09058d18.css
|
Maybe |
It does reduce verbosity but perhaps too much? In some of your examples, given the lack of semi-colons, I feel it would be extremely easy to confuse At a glance, Additionally, |
Oh my world For others if they don't know about it: https://developer.mozilla.org/en-US/docs/Web/CSS/@layer |
Uh oh!
There was an error while loading. Please reload this page.
When working with CSS utility frameworks, they tend to have all their rules ending with
!important
.A significant chunk of the generated output is just
!important
.What if
!
had the same meaning as!important
so that these two lines did the same thing:I can't see any tokenizing issues with this proposal, but others may explain why its not possible. I suspect people will say it will be gzipped away when sent from the server to the client, however it might be unneccessary verbosity for developers writing/diff'ing sourcecode. It is a feature I would really appreciate, and maybe others would to.
PS: Here's what it looks like next to an exclamation mark:
The text was updated successfully, but these errors were encountered: