3 ms·
The specificity graph is quite meaningful. For example, compare the specificity graphs for Yahoo (http://cssstats.com/stats?url=http%3A%2F%2Fyahoo.com#specifici
by harlanlewis 12y ago
The specificity graph is quite meaningful. For example, compare the specificity graphs for Yahoo (http://cssstats.com/stats?url=http%3A%2F%2Fyahoo.com#specificity-graph http://cssstats.com/stats?url=http%3A%2F%2Fyahoo.com#specifi...) and Amazon (http://cssstats.com/stats?url=http%3A%2F%2Famazon.com#specificity-graph 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/ 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.
- harlanlewis 12y agoAmazon might not be the best example - loading http://cssstats.com/stats?url=http%3A%2F%2Famazon.com#specificity-graph http://cssstats.com/stats?url=http%3A%2F%2Famazon.com#specif... multiple times has generated multiple, very different graphs. I wonder if the CSSStats bot has been thrown into more than one A/B experiments.
- mrmrs 12y agoIt's not currently grabbing all of the stylesheets - we are working on a fix for this at the moment.