katiefenn / parker

Stylesheet analysis tool.
Other
2.47k stars 73 forks source link

How should we use these metrics? #48

Open aeisenberg opened 8 years ago

aeisenberg commented 8 years ago

Great project and great tool! Thanks for implementing this.

I am able to get metrics for the css in my project. This is good, but now that I have it, it's hard to know how to use it. In general, I understand that we want to use fewer identifiers per selector, and use fewer selectors per rule, etc. But what number is good? What metric values should a project be striving for?

Not all projects are the same, but I think that we can all agree that for 99.9% of projects, using 10 identifiers per selector is too much. I'm hoping to get more precise than that, though.

I'm not expecting a precise answer, but I am hoping to start a discussion.

mrdrewkeller commented 8 years ago

There's a good post from CSS Wizardry explaining how this tool can be used - http://csswizardry.com/2016/06/improving-your-css-with-parker/

radiovisual commented 7 years ago

I agree that having some sort of documentation that explains the output (what to look for, what is good, what is bad, etc), could be useful. Also, having some sort of visual output to indicate the problem areas (or good areas) to make the output more meaningful upon immediate inspection. For example, if I run parker on a legacy project that is violating every single BEM rule in the book, the output "feels the same" as the output generated on the most law-abiding BEM project ever written (even though the numbers are different, the output "feels the same", if that makes sense)

It could be satisfying to see problem areas output in red text, and the good areas are output in green text, something like that.