CSS & Layout
CSS Specificity Calculator
Work out the specificity of any CSS selector and see which selector wins a conflict. Everything runs locally in your browser — nothing is uploaded.
Selectors
one per line
One selector per line, or paste a whole stylesheet — the selectors are pulled out
automatically. Commas inside :is(), :not() and attributes are kept intact.
Specificity
liveHow specificity is counted
Specificity is a three-part score (a, b, c).
a counts ID selectors (#id).
b counts classes (.class), attribute selectors
([type="text"]) and pseudo-classes (:hover).
c counts type selectors (div) and pseudo-elements
(::before). The universal selector * and combinators add nothing.
:is(), :not() and :has() take the specificity of their most
specific argument, while :where() always adds zero.