A correctness test suite for CSS minifiers.
https://www.keithcirkel.co.uk/css-minify-tests/ β// readme
css-minify-tests
A correctness test suite for CSS minifiers.
This project exists in good faith to improve all CSS tooling. It is not a leaderboard and it is not intended to declare winners or call out losers. Every minifier makes different trade-offs and every score reflects a snapshot in time. The goal is to give maintainers a shared, vendor-neutral corpus of transformations they can run against their own tool to find gaps and edge cases.
Inspired by Romain Menkeβs css-tokenizer-tests, which provides a similar community-driven corpus for CSS tokenizers; a project that helped raise the bar for tokenizer correctness across the ecosystem. The hope is that this suite can do the same for minification.
How it works
The suite contains 350 tests organised by category. Each test isolates one minification technique so failures are easy to diagnose:
tests/
<category>/
<NNNN>/
source.css # Unminified input
expected.css # Canonical minified output (single line)
README.md # Short description of the transformation
validate.html # Optional browser-viewable proof ofβ¦