Refactoring large/old CSS files
I'm currently working on a 100,000 page website, the current design has been in place for over 5 years and successive updates have resulted in four 12,000+ line CSS files.
Obviously the CSS has become unwieldy, many of the styles are duplicated and it's nearly impossible to know how many of the styles are actually being used.
We can minify, but this isn't really tackling the problem, just delaying the inevitable re-work.
So three questions are there any tools out there for...
- de-duplicating large CSS files?
- scanning the site and logging CSS class and ID use?
- could such scanning be achieved with a script of some kind, greasemonkey maybe?