Cascade
noun
say it: “kas-KAYD” /kæˈskeɪd/
The set of steps a browser follows to pick one winning value when several CSS rules set the same property on the same element.
What is the cascade in CSS?
The cascade is how CSS decides which rule wins when several set the same property on the same element. It weighs importance, specificity and the order the rules appear.
p { color: gray; }
p { color: black; } /* wins: same strength, comes later */
In a sentence
- “Thanks to the cascade, my orange button rule lost to a stronger one higher up, and the developer tools showed mine crossed out.”
Level: Novice · More CSS terms at this level
Updated