How to Find and Remove Unused CSS Code From Your Style Sheet

Posted In Add-ons, Browsers - By Piyush Dungrani On Sunday, November 14th, 2010 With 0 Comments

How to Find and Remove Unused CSS Code From Your Style Sheet. CSS (Cascading Style Sheet) is now becomes the most important area of the web design, and almost every page is having style sheet and class selector codes. If you are note the creator of your blog or website’s style sheet then you might not be aware from your css code, which css class selectors are being used and which are not in use. If you want to Find and Remove Unused CSS Code From Your Style Sheet then there is Mozilla Firefox plugin called Dust Me Selectors.

Find and Remove Unused CSS Code

It has the capability to extract all the class selectors from all the stylesheets on the page you’re viewing, then analyzes that page to see which of those selectors are not used. The data is then stored so that when testing subsequent pages, selectors can be crossed off the list as they’re encountered.

Dust Me Selectors v2.2

- You can test pages individually, or spider an entire site, and you’ll end up with a profile of which selectors are not used anywhere.

Features of Dust-Me Selectors 2.2

  • Supports local and remote stylesheets included using elements, processing instructions, and @import statements. (Note: rules inside blocks that are not @import statements, and inline style attributes, are not included.)
  • Supports stylesheets inside IE Conditional Comments.
  • Check a single page, or an entire site.
  • Understands all CSS1 selectors, and most CSS2 and CSS3 selectors (courtesy of Dean Edwards’ wonderful base2).
  • Caters for common CSS hacks — for example, “* html #foo” will be treated as “html #foo”.

- Add this Plugin to your Firefox from : Remove Unused CSS Code From Your Style Sheet page.

- Use it and let me know if you like it or not :)

About - A techie by profession (Intermediate QA Test Analyst) and a part time blogger by choice with knowledge of IT, and SEO, also writes articles on Google, Microsoft, Apple, iPhone, Internet, Blogger, Social Media and windows, Join Facebook Fan Page. Subscribe to MyTechTricks feed via RSS or EMAIL to receive instant updates.