Finding unused CSS styles

webdev ruby css

Fri Feb 22 21:31:00 +0000 2008

I inherited a hideous stylesheet and was trying to determine which styles were unused. I was about to write a Ruby script or something to go through all the pages in the site and find which styles weren’t used in any of the pages. Fortunately, someone already came across this problem. The Dust-Me Selectors Plugin for Firefox will do this for you. It lets you surf to as many pages in a site as you want to check on or it will read Google sitemap files and do the work for you.

What a fantastic (and free!) way to rid the web of outdated styles.

blog comments powered by Disqus