Does this measure color contrast or accessibility?
No. Specificity only compares selector weights. Use the Color Contrast Checker to measure contrast between two actual colors.
Runs in your browser. No file uploads for processing. Privacy details
Compare CSS selector specificity side by side, including :is(), :where(), :has() and selector lists, without applying styles to a page.
Loading tool...
Enter the text before the opening brace, such as .card:where(#feature, .promo), in each field. An ordinary comma-separated list shows a separate score for each branch.
Compare IDs first, then classes, attributes and pseudo-classes, then types and pseudo-elements. .card:where(#feature, .promo) is (0,1,0); article:is(.card, #feature) is (1,0,1) because :is() uses its strongest argument.
A higher score only helps when both selectors match the same target and the competing declarations have the same origin, importance and cascade layer. The tool does not apply either selector to your document.
The tool processes inputs in your browser. File processing and site analytics are separate.
No. Specificity only compares selector weights. Use the Color Contrast Checker to measure contrast between two actual colors.
No. The pseudo-class and all of its arguments contribute zero, but the rest of the selector still counts.
It contributes one pseudo-class plus the specificity of the strongest selector in its of list. Without an of list, only the pseudo-class counts.
It depends on the selectors that actually match the target. The tool lists each branch rather than treating the strongest branch as the winner for every element.