Posted: 23 Nov 2010 09:20 AM PST
In one of my previous article “Remove all unused CSS selector” I wrote about how one can remove unused selector from his stylesheet using Dust-Me-Selectors, similarly I found an Addon which has few benefit over Dust me selectors. CSS Usage is a Mozilla extension which finds unused selectors and can be exported a new file.
Steps to go about it :
- Open the Firebug interface.
- Select CSS Usage at extreme right of the Firebug interface.
- Click Scan as shown in the below image.
- Now you will find the selectors in Green and Red colors. Green and Red color indicates Seen and Unseen selectors in the stylesheet respectively.
- Then you can click export cleaned CSS that exports the cleaned CSS in a new tab, copy it and edit it in your original stylesheet.
Paste it in your stylesheet and you will find “UNUSED” prefix to the selectors in your file, where you can delete those selectors according to your specification.
If you have any ideas about similar stuff you can share it through the comments.
Technical Solutions Professional | Modern Workplace Architect Lead | Microsoft 365 | SharePoint | Power Platform | MS Teams | React
Leave a Reply