I’d like to know if there’s a tool that exists that will comb through a site and report all the CSS rules that are used nowhere in the site, i.e. old CSS junk that got left behind… ?
SitePoint has a Firefox tool for this very purpose, Called Dust-Me Selectors.
Beware that you need to disable any menu editing add-ons (like Menu Editor and Tiny Menu) if you have them, and then restart firefox before you use this tool.
Caused me several hours of headache before I figured out why it wouldn’t work on my system.
I’m wondering how effective this tool can be for a Joomla site? I ran the spider thing, and the progress bar barely moved after some long period of time. I finally gave up and shut the computer and went to bed it was taking so long. Can this be used on a joomla site?
Thank you! I will give it a try… I need to use it on a joomla site
Cool, I’ve been wondering about some kind of “magical tool” to clean up un-used styles as well.
As far as the Joomla-specific question is concerned, from my understanding, you need to have the HTML output and the CSS to make this work.
Obviously, if you run any kind of web site that is gets generated by PHP, Java or .NET, it would be difficult to clean up effectively, since the dynamic code snippets (that end up creating the various HTML pages) could reside in multiple PHP, Java or .NET files. And that code can’t be cleaned up with Dust-me Selectors.
AFAIK dust me selectors is the only CSS cleanup tool that exists,
I don’t quite know how the addon works, however if you were to just take the outputted styles and run them through the addon would tht not suffice?
If the addon doesn’t work like that I guess I’ll add it to my FF and take another look (heck I might even clean up…oh wiat I don’t have a site anymore :()