The Cascade: Origin and Order
Understand how stylesheet origin (user, author, browser) and source order determine cascade priority.
What is the Cascade?
The cascade is the algorithm CSS uses to determine which style declaration wins when multiple rules target the same property on the same element. It considers origin, importance, specificity, and source order.
Cascade Origins
CSS declarations come from three origins, in priority order:
- User-agent stylesheet — browser defaults
- User stylesheet — custom styles set by users (accessibility)
- Author stylesheet — your CSS files
All lessons in this course
- Specificity Calculation: Inline Style ID Class Element
- The Cascade: Origin and Order
- !important: When and Why Not
- Inheritance and the all Property