Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm looking for a tool which would be able to identify unused and/or duplicate css selectors and rules, with the following two restrictions:

  • The tool would have to be able to analyze css pages which are used for many HTML pages, so a tool like Dust-Me won't help.

  • The tool should also work on a local installation, because I'd also like to be able to check my css at development stage. This would rule out online css verifiers.

share|improve this question
add comment

2 Answers 2

There is a Firefox addon called CSS Usage which shows all styles used/unused on a page.

It claims to do multiple pages but in my experience it seems to be somewhat unreliable in its results. Regardless it has helped me out a bunch in the past.

share|improve this answer
add comment

I have tried Dust Me and CSS Usage in the past with some success to get an initial list of unused css selectors. Then what I do is focus on searching for those potentially unused selectors manually. At least that reduces the scope of the problem from hundreds of selectors to a few dozens.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.