How the tools are checked
What each tool is tested against, what it can't know, and how to report a mistake.
Principles
- Client-side only. Every tool runs in your browser. Pasted CSS, HTML and selectors are analysed on your device and never sent to a server.
- Nothing stored. No cookies, no analytics and no account. The only thing kept is your theme choice, in your browser's local storage.
- Links only carry what you share. Stylesheet Audit and Accessible Name Wars put your input in a link only when you press Copy link, and Selector Playground never does. CSS Specificity Wars keeps its selectors in the address bar as you edit, so the page can be bookmarked; that address stays in your browser unless you send it.
- Same answer without JavaScript. Each tool page includes a pre-calculated example from the same engine the live tool uses.
CSS
CSS Specificity Wars
How it is checked
- Scores come from
@bramus/specificity. The lab's own walk of the css-tree syntax tree produces the per-part breakdown, and the tests require the parts to add up to the library's score. - The reference vectors in
specificity.test.tscover IDs, classes, types,:is(),:not(),:has(),:where(),:nth-child(… of S), shadow DOM selectors, namespaces and legacy pseudo-elements. Each must match its expected triple and the library. - Nesting expansion, the duel verdict, fix suggestions and the seven-step cascade resolver have their own suites (
nesting.test.ts,compare-suggest.test.ts,cascade.test.ts) with hand-written expected results. They have no external oracle.
Known limits
- Selectors over 1,000 characters are rejected. Nesting input is capped at 2,000 characters; the expanded rules together may contain up to 50,000 selector characters and use up to 1,024 substitutions.
- Unknown pseudo-classes are counted like classes but flagged. Invalid arguments in the forgiving
:is()and:where()lists are dropped with a warning. - The cascade resolver decides between the two to four declarations you describe. It doesn't read your page or your stylesheet.
CSS
Selector Playground
How it is checked
- Uses the same
calculate()engine and unit tests as CSS Specificity Wars. - Browser tests in
playground.spec.tscheck the highlighted parts, per-part contributions, functional pseudo-class rules, warnings, each score in a selector list, and recovery from invalid input.
Known limits
- Selectors over 1,000 characters are rejected.
- It scores selectors; it doesn't decide which rule wins the cascade. Use CSS Specificity Wars for that.
CSS
Stylesheet Audit
How it is checked
audit.test.tscovers parsing (multiline selector lists, nesting, conditional chains, layers, imports and size caps), metrics (real triple ordering and the lower median) and findings, with hand-written expected results.- Scores come from the same
calculate()and nesting from the sameexpandNesting()as CSS Specificity Wars; there is no second scoring implementation. CSS is parsed with css-tree.
Known limits
- It does not evaluate media conditions, match selectors against a document, expand imports or compare property values.
- Keyframes, font descriptors and unsupported at-rule groups are not selector rules and are reported as excluded.
- Input is capped at 100 KB, and only the first 5,000 selectors are scored. The report is a starting point for review, not a replacement for browser inspection.
Accessibility
Accessible Name Wars
How it is checked
- The engine follows the AccName 1.2 computation steps and HTML-AAM.
- Each fixture in
compute.test.tsis computed through both adapters, the build-time parse5 adapter and the browser DOM adapter, which must agree. The result is then compared withdom-accessibility-apirunning on jsdom. - Where that library and the specification disagree, the test records the difference next to a link to the governing specification text. Another test parses hostile markup and checks that nothing is requested or executed.
Known limits
- It reads attributes and text, not the rendered page. It recognizes
hidden,aria-hidden="true"and inline hiding styles. - It can't know class-based styling, generated text, layout-dependent whitespace, shadow-tree changes or values changed by scripts.
- Markup is capped at 4 KB. Browser-generated button labels are shown in English. Always verify the final page with your browser and assistive technology.
Accessibility
Focus Order Trace
How it is checked
- The engine follows the HTML standard for focusable areas and sequential focus navigation: positive tabindex first in ascending order, then document order, one stop per radio group.
order.test.tscovers tabindex parsing, disabled fieldsets and legends, hidden and inert content, closed details and dialogs, radio groups and each check, with hand-written expected results.focus-order.spec.tsrenders fixtures in Chromium, Firefox and WebKit, presses Tab through them and compares the real order with the engine’s.
Known limits
- It reads attributes, not the rendered page: stylesheet rules that hide or reorder content are not applied, and inline reordering styles are flagged for a person to confirm.
- Browsers can add stops of their own, such as scrollable areas, and Safari tabs to links only when its keyboard setting allows. Shadow trees, iframe contents and script-driven focus are out of reach.
- Accessible names come from the Accessible Name Wars engine. Markup is capped at 4 KB.
How the site is checked
Every pull request runs the unit tests and the browser tests in Chromium, Firefox and WebKit. Every page is scanned with axe-core in the light and dark themes, and the colour tokens are checked against WCAG contrast ratios offline.
Tested versions
Read from the lockfile when the site is built.
| Package | Version | Used for |
|---|---|---|
@bramus/specificity | 2.4.4 | Specificity scores, in the tools |
css-tree | 3.2.1 | CSS and selector parsing, in the tools |
parse5 | 8.1.1 | HTML parsing for the pre-rendered accessible-name and focus-order examples |
dom-accessibility-api | 0.7.1 | Accessible-name oracle, in unit tests |
jsdom | 31.0.1 | The DOM the oracle runs on, in unit tests |
axe-core | 4.14.1 | Accessibility scans, in browser tests |
@playwright/test | 1.65.1 | Browser tests in Chromium, Firefox and WebKit |
Report a wrong result
If a tool gives an answer you think is wrong, open a wrong-result report on GitHub with the input, what you expected and what the tool said. Reports are public, so don't paste private code.