13

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.

2 Answers 2

5

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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