unused css remover for wordpress

Marcink99

Power Member
Joined
Aug 23, 2010
Messages
736
Reaction score
109
Does anyone have or know a tool that will automatically find unused css and generate new css for wordpress?
 
Whilst not quite automatic, there is a firefox add on "css-usage" that you can use to visit a few pages on your site and it will record which css is used and which isn't.. Though you need to manually delete the CSS that it marks as unused....

Once you've cleaned up your CSS, it's a good idea to run it through an online css compressor to clean/compress it even more :)
 
It would be difficult to remove unused CSS since it's one big file that covers many different pages (category page, post page, homepage, archives, tag page, widgets, etc.) I wouldn't recommend doing this unless you know exactly which rules will be unused.

As bobred pointed out in previous post, use a css compressor to get rid of unnecessary spaces and new lines. If you want to clean up unused rules because of the Google speed test tool, don't worry about it. Deleting couple of lines of "unnecessary" code won't make much difference.
 
Back
Top