Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Mack2458yI only used important for handful of the rules. Never found myself writing them one after another. Instant articles for instance require you to write important free CSS.
-
@tirthaguha Nesting is an alternative. This is where preprocessors such as SASS come into their element
There's also the easiest option of changing the order in the stylesheet. Styles at the bottom overwrite those at the top -
Purexo828ySometimes, I need use !important for override bad WordPress plugin styling whose inject css in style attributes in tag.
This things make me sad. But don't have choice 😢 -
I actually found some "!important" in the product I'm working on. Asked and was replied that it's the problem of the framework we'r using. Anyway I tried my best to avoid using it.
When you start writing CSS yourself, and every style is
! important
undefined
! important css