DEV Community

Discussion on: Using !important in CSS

Collapse
 
vuelancer profile image
Vuelancer

inline styles will replace !important

I learnt this by the video trivia by web dev simplified and kevin powell!

And kevin as a CSS Mastermind lost to this question... Very bad!

But, Kevin is the CSS Master!

Collapse
 
alvaromontoro profile image
Alvaro Montoro

Wait...!important will trump inline styles 🤔

Collapse
 
alvaromontoro profile image
Alvaro Montoro

You made me doubt for a second, so I created an example of it for another comment: !important does override inline styles.

Collapse
 
alohci profile image
Nicholas Stimpson

Actually I expect custom origins/cascade layers to eventually replace most !important use. But it'll be some years before we can use them.