Have you ever wondered how you could search for unused classes/ ids in your cascading stylesheet file (.css) so that you can minimize the size of the file for faster website loading?
This Firefox extension will be handy to web designers working with CSS on daily basis to design their websites. Dust-me-selectors extension let you search for unused CSS selectors by scanning the source of the current HTML page you’re viewing and matched it with the stylesheet.
- Install it in your Mozilla Firefox, restart the internet browser, go to the url of your website, and press Alt+Ctrl+F to start the scanning. If it found anything that is unused is present in the css file, it will give out the list of them like below:
- That applied to one html page only so if you’re using more than one html pages with different style used, you will need to scan each one of them to get the job correctly done. Instead of pressing Alt+Ctrl+F, select automation from the extension context menu start to browse around the site.
- The data you gathered just now will be stored temporary, so that as you continue to browse around the website, selectors will be canceled automatically from the list as they encountered.
You will end up with a profile of which selectors are not used anywhere on the site.
September 12th, 2007 at 12:41 pm
Cool css program.. Does it have any auto features? Like dreamweaver?
September 13th, 2007 at 12:22 am
Nope. It’s a browser based tool. You install it like other extension (for Firefox) and it will check your css file for unused css selectors.
February 21st, 2008 at 8:23 pm
What if some of the selectors are not used on the current page? In other words, is there a way check for css selectors that are not used across the entire site?
August 11th, 2008 at 4:03 am
HI,
But this tool will help only to show the one unused in current page. It will be helpfull if it show unused css in thw whole site, becuase we will be able to delete tht classes from css….