Hey, Does anyone know if the following sorts of program exists.. Say you have your whole sites CSS in one file like: .main{ color:#000; border:1px solid #FF0; } .main2{ color:#FFF; background:#000; border:1px solid #FF0; } Code (markup): Is there anything that can analyse that and then shorten the css down to remove multiple used code that's not needed and give you something like: .main, .main2{ border:1px solid #FF0; } main{ color:#000; } .main2{ color:#FFF; background:#000; } Code (markup): This example doesn't really do justice to the sort of code that would be saved but you should get the idea of what I'm trying to achieve when the CSS file is 20kb in size.
Hi, I actually just did a blog on this on Tuesday - you can read it here. Seems like it's exactly what you need.
I would advise against letting ANY software handle that. Not only could that screw up specificity issues, things like the cleaner will often miss that some elements are used on subpages. I've had two clients believe in that bullshit and had to re-upload their pages from scratch because of it. It's like most of the automated tools, if the page is written properly in the first damned place they do more harm than good.
Well mine are all written correct just a couple of instances where the css is used over and this solves that. I'd never replace my css with this but creating a main-min and seeing if it all functions correctly isn't going to harm anything.