Specificity is calculated as a four-part score (a, b, c, d):
The highest specificity wins. !important overrides all. :where() has zero specificity.
CSS specificity is the algorithm browsers use to determine which CSS property value is applied when multiple conflicting declarations target the same element. The selector with the highest specificity score wins.
It uses a four-part tuple (inline, ID, class, element). Inline styles count as 1000. Each ID counts as 100. Each class, pseudo-class, or attribute counts as 10. Each element or pseudo-element counts as 1. A score of (0, 1, 2, 3) = 100 + 20 + 3 = 123 in total value.
Yes — the :where() pseudo-class always contributes zero to specificity, regardless of what's inside its selector list. This is a CSS feature (Level 4) and this calculator correctly handles it.
!important declarations override all normal declarations, regardless of specificity. When multiple !important declarations apply, specificity determines which one wins. This calculator shows a warning for selectors that might be used with !important.
Yes — when two selectors have equal specificity, the one that appears later in the stylesheet wins. This is the "cascade" part of CSS. This calculator only shows specificity; it doesn't track source order.