SyntaxStudy
Sign Up
CSS Intermediate 4 min read

The CSS Cascade

Cascade Order

The cascade determines which rule applies when multiple rules have the same specificity. Origin, importance, and source order all play a role.

Example
/* Cascade order (highest wins): */
/* 1. !important user-agent styles */
/* 2. !important author styles */
/* 3. !important user styles */
/* 4. Normal author styles      ← your CSS */
/* 5. Normal user styles */
/* 6. Normal user-agent styles  ← browser defaults */
/* Within same origin + importance: specificity, then order */
Pro Tip

Normal author styles are layer 4 — the browser default styles (layer 6) are easy to override.