🏠 Home

CSS specificity cheatsheet

CSS specificity is one of the stages of the Cascade algorithm to help resolve conflicting style rules.

Cascade algorithm

  1. Position & order of appearance
  2. Specificity
  3. Origin
  4. Importance

Specificity

ItemPoint
Universal selector0
Element, pseudo-element1
Class, pseudo-class/attribute10
Id100
Inline style1000
!important rule10000