intermediatetermCSSCSS / CSS fundamentals / The cascade
IntermediateNot yet reviewed

The cascade

The cascade is how the browser decides which rule wins when several target the same element.

Definition

The cascade is how the browser decides which rule wins when several target the same element. It weighs where a rule comes from, how specific it is and the order it was written.

Use case

When a style refuses to apply, the cascade explains why. Check which rule is winning in your browser's developer tools.

Related terms

Documentation

Suggest a change