katiefenn / parker

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

Idea: List the 10 most specific selectors #17

Open simevidas opened 10 years ago

simevidas commented 10 years ago

Hey, I ran your tool against the main CSS file of BBC's new responsive site. See the output here: https://twitter.com/simevidas/status/441716656214011904

I've noticed that the most specific selector is:

#locator #locator-search-container.disabled button #locator-submit

which is a needlessly specific selector (no need for 3 ID selectors) and BBC's team should probably refactor it to something simpler.

This gave me an idea: Find the most specific selectors in my code and try to simply them. Your tool could provide this information. Would be quite useful, I think. What do you think?