Specificity
Specificity is a score for how targeted a selector is.
Definition
Specificity is a score for how targeted a selector is. IDs outrank classes, which outrank plain tag names, and the highest score wins.
Use case
Overly specific selectors are why later edits get ignored. Keep selectors flat and class based so they stay easy to override.
Related terms
Documentation
Specificity
Shows exactly how the score is calculated, with examples.