4

I'm making template. In css file are many css classes, which are no longer used in the template. It takes a long time to find and remove them manually.

Is there any tool that will find and remove unused css classes?

user3724896
  • 139
  • 2
  • 12
  • 1
    Have you tried google? I justed googled it and had bunch of great results on the first page. It has been asked here in the past as well... – vsync Jul 28 '14 at 10:54
  • @vsync thnks.. Not, i'm not tried. Now try – user3724896 Jul 28 '14 at 10:56
  • 2
    http://stackoverflow.com/q/7407220/104380 | http://stackoverflow.com/q/1761242/104380 | http://stackoverflow.com/q/12091356/104380 and a million more – vsync Jul 28 '14 at 10:59

3 Answers3

5

Try Firefox extension Dust-Me

OR

you may also try Chrome Developer Tools

This Chrome developer tool has an Audits tab which can shows unused CSS selectors.

Run an audit > under Web Page Performance see Remove unused CSS rules

OR

http://unused-css.com/ tool explores your all pages and removes unused CSS.

Naveen Kumar Alone
  • 7,536
  • 5
  • 36
  • 57
2

In Firefox "CSS Usage" Ad-dons is available. CSS Usage Link

Ashish Mehta
  • 7,226
  • 4
  • 25
  • 52
2

We Use Chrome's Audit feature. Very simple and easy to use. Below is the screenshot showing unsused CSS for gmail. By viewing this, you can remove the unnecessary ones.

This works even for localhost sites. (You need not move to public URL to test.)

gmail's audit for Unused CSS

ngrashia
  • 9,869
  • 5
  • 43
  • 58