The Cascade

The Cascade: The Cascade: How the Browser Picks a Winner, Specificity: Scoring a Selector.

Updated

  1. The Cascade: How the Browser Picks a Winner (Apprentice): When two CSS rules set the same property on the same element, the browser runs the same tie-breaker contest every time, and knowing its rounds tells you why a style won or lost.
  2. Specificity: Scoring a Selector (Apprentice): Specificity is the score the browser gives every selector, in three columns, and comparing two scores column by column tells you which rule wins before you refresh.