I design sites (not well most of the time!) and often pinch bits and bobs from the various CSS stylesheets I’ve created over the years, generally I normally end up coming up with something that looks at least half decent!

However, all that cutting and pasting leaves my stylesheets in a mess – with tonnes of unused CSS styles!

I spotted a reference to Dust-Me Selectors today on San Baldo, and using this fantastic Firefox Extension I have managed, in the space of minutes to reduce on stylesheet from an unmanageable 600 lines to a mere 200!

It extracts all the selectors from all the stylesheets on the page you’re viewing, then analyzes that page to see which of those selectors are not used. The data is then stored in your user preferences, so that as you continue to navigate around a site, selectors will be crossed off the list as they’re encountered.

You’ll end up with a profile of which selectors are not used anywhere on the site.

If you found this post useful, why not buy me a coffee or a beer (depending on the time of day obviously!):

If you really want to learn about CSS you need to be reading some of the following books: