Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find unused css [duplicate]

I'm doing some development for some pages on our internal network. I want to know if there's an open source tool or FF plugin which can identify unused css within a project.

I've looked at using this, but when I try to install the Add-on Installer says "Not compatible with Firefox 3.6"

https://addons.mozilla.org/en-US/firefox/addon/dust-me-selectors/

Please note, this is for an intranet - not a www visible website - so I can't use the online sites which offer such services.

like image 532
martok Avatar asked Jul 11 '11 12:07

martok


2 Answers

Google Chrome (and therefore probably Safari as well) have the developer tools installed, which come with Audits. When you audit the page, the unused CSS rules is one thing it checks.

Here's what it looks like on this page.

Audit

like image 86
Robert Avatar answered Sep 21 '22 06:09

Robert


I've been looking for a while, and the best thing I found was this:

http://unused-css.com/

They scan your site and email you the result css.

I am aware you are working on a localsite, however if you find no alternative, you can upload your site somewhere and use this

Alternatively

You could install a previous version of firefox that is compatible with dust-me selectors and run it along side your current installation of firefox.

like image 23
Eddie Avatar answered Sep 24 '22 06:09

Eddie