Skip to content

Latest commit

 

History

History
9 lines (5 loc) · 348 Bytes

File metadata and controls

9 lines (5 loc) · 348 Bytes

CSS Specificity

Example to accompany More Neat CSS Things.

Usage

  1. Observe the initial state of the page. The text appears in blue, since all of the selectors have the same specificity, and the blue rule comes last.

  2. Modify the stylesheet gradually incorporating higher specificity selectors so that earlier rules still take precedence.