How can I strip out extraneous CSS rules from my stylesheets?
July 28, 2007 9:54 AM   Subscribe

How can I strip out extraneous CSS rules from my stylesheets?

I've got an external css file that I've modified quite extensively and it's also quite long. I would like to compare the rules in the css file with the div and class tags that I've added in my html and then discard all the css rules that don't apply. So this isn't CSS optimizing like CSS Tidy . . .

Is there anything either on or offline that will allow me to do this?
posted by jeremias to Computers & Internet (6 answers total) 11 users marked this as a favorite
 
CSS Redundancy Checker
posted by Rhomboid at 10:38 AM on July 28, 2007 [3 favorites]


great link rhomboid!

i want to point out that a few posts later, he links a css redundancy checker that doesn't require a ruby interpreter, but instead, runs with greasemonkey in your browser
posted by fishfucker at 10:54 AM on July 28, 2007


Perfecto!
Thanks to both of you, I love it when a plan comes together . . .
posted by jeremias at 1:03 PM on July 28, 2007


While this may not do exactly what you're asking, the CSS Superdouche is a pretty handy little CSS optimizer.
posted by Wasabunchi at 1:24 PM on July 28, 2007 [1 favorite]


Wohoo, I made that one.
posted by tmcw at 1:56 PM on July 28, 2007


To answer my question, I also found this extension recently, it looks pretty well documented, Dust-Me selectors.
posted by jeremias at 7:16 PM on August 6, 2007


« Older Stopping the onslaught of buckets of sweat   |   Can your brain create imaginary people when you... Newer »
This thread is closed to new comments.