by politelemon · 4y ago · 0 comments
https://www.w3.org/TR/css-cascade-5/#important
https://www.w3.org/TR/css-cascade-5/#importance
If the intention is indeed as described, then the CSS designers failed to communicate it properly, and not "a sign you may not understand the cascade properly."
The example or use case they describe doesn't even make sense to me. Nor does it even seem to line up with how CSS specificity or cascade works.
"Here's a paper to write on, oh wait why are you drawing, this is a writing paper, you're doing it wrong!"
This is how I felt reading it as well. IMO Steven should exercise a little humility.
It was bad design on his team's part. How is anyone supposed to know that there was only one super secret reason for "!important" to exist? Why not call it something like "!break-cascade-override"? They put an emphasize on making the language look "clean" over real world usability and this is the outcome.
> Alas not. I wish there had been an agreement that after some number of years the records would be made public.
https://twitter.com/stevenpemberton/status/15059585359763456...
Here, the author is asserting that there is only one valid use case of !important, and that it shouldn’t be used in the general case. If it shouldn’t be used generally, having a general name is bad design.
or the React way, "!enforce--only-use-this-for-legal-font-size-or-you-will-be-fired"
> This CSS feature improves accessibility of documents by giving users with special requirements (large fonts, color combinations, etc.) control over presentation.