How to use it
- 1
Paste one selector or a comma-separated list.
- 2
Review the resulting score for each selector.
- 3
Compare ID, class/attribute/pseudo-class, and type buckets.
What the tool can do
- Counts ID selectors, classes, attributes, and pseudo-classes.
- Counts type selectors and pseudo-elements.
- Limited function support: :where() contributes zero; :is(), :not(), and :has() use the most specific argument.
Common use cases
- Debugging a conflict between a utility class and a component selector.
- Checking a selector before simplifying CSS.
- Documenting specificity rules in a design system.
How it works inside
The score is emitted as IDs-classes-types, for example 1-2-0.
:where() is zeroed according to modern specificity rules.
Questions and answers
How can I understand why one CSS rule overrides another?
Paste the selectors and compare their specificity, a priority determined by selector structure. Also consider stylesheet order, cascade layers, and !important. Specificity alone cannot explain every conflict.
Should I paste an entire stylesheet?
Enter the selectors you want to compare rather than a complete CSS file. The calculator analyses their priority but does not load a page or determine an element's applied style. Inspect applied styles in your browser's developer tools.
