Open source · Node.js

Numbers that tell you when your CSS is getting away from you.

StyleStats parses any HTML or CSS document and produces a small set of metrics — selectors, colors, font sizes, cohesion, !important usage — that act as an early warning system for stylesheet complexity.

# install
$ npm install -g stylestats
# run
$ stylestats path/to/file.css
→ Total Stylesheets: 1
→ Selectors: 245
→ Unique Colors: 23
→ !important Keywords: 4

View test results for popular sites

Sample reports we keep on file — pick one to see the metrics.

All results →
#

Quantify complexity

Count selectors, unique colors, font sizes, and float properties — the signals that drift first.

Track cohesion

Average and lowest cohesion scores reveal selectors that try to do too much at once.

Catch !important drift

Spot specificity wars before they become impossible to untangle.

From the blog

Articles on CSS, design systems, and front-end craft.

All posts →

Browse by category