Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS out of control

Tags:

css

Are there any utilities that will crawl a site and determine which css rules are in use and which are not? We have a large site and a huge CSS file (--don't blame me I just got here). And, I think much of it is not being used however I'm afraid to strip stuff out just in case.

The file is confusing and difficult to manage and I think if we can trim it down by getting rid of the unused rules we will have a good starting point to go through and try to make it better.

like image 249
Paul Avatar asked Sep 11 '10 13:09

Paul


2 Answers

Try the Dust-Me Selectors Firefox extension by SitePoint. It finds CSS selectors whose rules are never applied to your pages so you can remove them from your stylesheets.

like image 64
BoltClock Avatar answered Sep 23 '22 13:09

BoltClock


https://addons.mozilla.org/en-US/firefox/addon/10704/?src=collection&collection_id=23d14a2d-b396-c08f-e9ba-b4d34691d5a9

It's an addon in Firebug.

like image 45
Paul Avatar answered Sep 22 '22 13:09

Paul