top | item 8654497

CSS Stats

142 points| sethbannon | 11 years ago |cssstats.com | reply

32 comments

order
[+] mxpxrocks10|11 years ago|reply
hey CSS Stats - let me know if we can sponsor you. chris at maxcdn com - can get you an account right now.
[+] sorahn|11 years ago|reply
This is awesome in a "now I want to spend ages refactoring my CSS to make my numbers look awesome" kind of way.
[+] shdon|11 years ago|reply
I get only blank pages returned. Assuming it has buckled under the onslaught of HN visitors, what does it show when it works normally?
[+] mrmrs|11 years ago|reply
Apologies for the downtime. Should be back up now.
[+] benologist|11 years ago|reply
What would this tool be useful for?

It almost seems like an on boarding tool for 3rd party CSS but you can't construct or derive style rules from any of the presented formats, just raw colors/sizes.

The charts and metrics all seem superfluous.

[+] harlanlewis|11 years ago|reply
The specificity graph is quite meaningful. For example, compare the specificity graphs for Yahoo (http://cssstats.com/stats?url=http%3A%2F%2Fyahoo.com#specifi...) and Amazon (http://cssstats.com/stats?url=http%3A%2F%2Famazon.com#specif...) - selected for both being public-facing sites of similar size.

Because CSS rules are applied by specificity (http://specificity.keegan.st/) first and source order second, any property overwrites later in the document require equal or greater specificity than rules in the middle. A chart with a mountain in the middle today will probably develop more mountains on the right over time - it's a leading indicator of poor maintainability. Pairing this tool with one that tells you the line number of offenders would help in identifying areas in need of refactor.

Total vs Unique declarations reveals opportunities for reusable OOCSS-type classes (which itself can be difficult to do in a stylesheet full of specificity mountains).

The colors aren't terribly useful without a histogram and some of the other stats do seem a bit superfluous, but they may just need someone more experienced than I to draw the right conclusions.

[+] CoachRufus87|11 years ago|reply
Is there a browser extension version of this so that it can be run on pages that require authentication?
[+] mrmrs|11 years ago|reply
We don't have one yet - but that's a great idea. We'd like to support basic auth somehow.
[+] _mikz|11 years ago|reply
Definitely will try to improve my styles to reduce unique definitions.
[+] ww520|11 years ago|reply
The site loads very fast. That's impressive.
[+] elwell|11 years ago|reply
Why not just host on aws?
[+] mrmrs|11 years ago|reply
It is hosted on AWS! I am just a dev ops n00b. Working out the kinks at the moment.