tags:

views:

3159

answers:

4
+11  Q: 

CSS cleaner

I've taken over looking after a fairly complex site developed by another company, and frankly it's a mess. One of my problems is that there seems to have been no discipline when writing the html so that although they have used css extensively, there are half a dozen css files and a cursory analysis reveals that there is a significant number of styles in the css files that are not referenced by any of the html - rather they contain trail of false redesign starts and old, now redundant, styles mixed in with the current items.

I'd really like to clean all this up before moving onwards. Does there exists any tool, open source or otherwise, that can take a bunch of html and css files and cross reference them so as to highlight the cruft in the css?

+14  A: 

Try the Dust me Selectors plug in for Firefox.

dbrien
That looks awesome! Have you used it?
Nathan Long
+1 great resource
Jakub
+6  A: 

When you have the css organised into the separate stylesheets you can run the code through an online tool to tidy up the layout. Try one of these:

rdjs
Flattering. I programmed the first link posted above.
LonnieBest
A: 

Nice tip. Thanks!

Sohail Ahmed
This is not an answer, it's a comment. Please delete it.
Jouke van der Maas
A: 

dust me selectors has almost the same functionality that my jquery css cleaner has.

and it looks great

joaquin nunez