DEV Community

Discussion on: CSS cascade: Importance

Collapse
 
facundocorradini profile image
Facundo Corradini

!important actually affects the origin, not the specificity.

Origin is in a whole level above specificity when it comes to determining the cascading value

developer.mozilla.org/en-US/docs/W...

Collapse
 
alohci profile image
Nicholas Stimpson • Edited

Sorry for this bit of pendantry, I used to think that, but that's not quite correct either. Rather than !important affecting the origin, think of origin and importance as complementary, and that they work together as a pair to affect the highest level of precedence within the cascade.