4 ms·
DustMeSelectors is a nice tool for some applications. Here's how you use it. Option 1: Give it a site map. It will scan everything and give you a list of unused
by billybob 17y ago
DustMeSelectors is a nice tool for some applications. Here's how you use it.
Option 1: Give it a site map. It will scan everything and give you a list of unused selectors.
Option 2: Load up one of your pages and tell it to scan. It will give you a list of unused selectors on that page. Go to another page and scan. It will narrow down the previously-gathered list (if a selector was unused on the first page but is used on the second page, it is removed from the list). Repeat until you've covered everything you need to.
When you're done, you can export the unused selector list to a CSV file. Each column is a style sheet, and each row is a selector.
It's a lot faster than doing it by hand, but it does assume that you can see everything that anyone can see. At the very least, you can take that list and search your files for <div class="crazyselector"> and see if it is truly never used. If it's the only occurance, maybe you can refactor that HTML to use a more common selector.