Topic: how to detect unused css classes/ids (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |
Paranoid (IV) Inmate From: Norway |
![]() You could use a browser supporting or a JS framework replicating querySelectorAll() and go through the selectors in your stylesheets. If a call returns an empty collection, you've got a winner. |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |
Paranoid (IV) Inmate From: Norway |
![]() That API is quite recent. There isn't many [stable] browser supporting it. The fastest way is certainly to go with jQuery or any similar framework. |
Paranoid (IV) Inmate From: Norway |
![]() Check slickspeed to see if the browsers you have have native support for the selector API. |
Paranoid (IV) Inmate From: A graveyard of dreams |
![]() You could also have a look at the Dust-Me Selectors addon to Firefox. It gives you a nice list of all unused CSS-selectors on a given page. |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |
Bipolar (III) Inmate From: Phoenix |
![]() Wow, great tool! |