Skip to content

CSS Conformance

Lanexio™ Parser implements the CSS Syntax Module Level 3 tokenizer and parser. The conformance suite validates tokenization, selector parsing, at-rule recognition, and value extraction against the W3C test corpus.

991 tests pass, 2 skipped. The two skipped tests require runtime layout information not available in a headless parser.

The CSS grammar includes parseCss for single stylesheet parsing, extractCSS for embedded <style> content, and parseAllCSS for multi-stylesheet documents. A validateValues utility checks CSS property values against known syntax rules.

AxisResult
never-throw0 throws
well-formedgated, corpus clean
losslessskipped (CSS normalizes source)
conformance991/991 passing, 2 skipped

CSS normalizes whitespace and formatting during parsing, so byte-exact lossless round-trip does not apply. The conformance gate verifies structural correctness of the parse tree.

pnpm conformance:suite measured this family over the test_files/css corpus on 2026-10-06 at Lanexio™ Parser version 1.0.0:

familyvalidinvalidrawcontract-subsetREAL-DEFECT
css3530100.0%100.0% (353/353)0