How can I effectively clean up styles in a large web site?

Short of going through each .tpl file and searching the file for the selectors manually, I don’t see any other way.

You could of course use Dust-Me selectors, but you’d still have to go through each page that uses the .tpl files (not each url as I know that many of them will be duplicates).

Sounds like a big job! I had to do it once before and I did exactly that, took me a week.


Another tool is a Firebug plugin called CSS Usage. As far as I read it can work across multiple pages but might break if used site-wide. Give it a go.


Triumph! Check out the Unused CSS online tool. Type your index url into the field and voila, a few minutees later a list of all the used selectors 🙂 I know you want the unused ones, but then the only work is finding the unused ones in the file (ctrl+f) and removing them 🙂

Make sure to use the 2nd option, they’ll email you the results of the crawl of your entire webpage. Might take up to half an hour, but that’s far better than a week. Take some coffee 🙂

Just tested it, works a treat 🙂

Leave a Comment