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 2 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 :)

Incoming search terms:

Remove unused CSS, unused css remover, detect unused css, remove unused classes from html, an advantage of removing unused styles http, remove unneeded css from visual studio 2010, remove unused css rules visual studio plugin, visual studio addon for removing unused css classes, visual studio find unused CSS, how to locate unused stylesheet rules, how to find unused css on webpage, how to find unused css in visual studio solution, how to find firefox css, how to find all unused css class name, find unused stylesheets

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

Displaying 2 Comments
Have Your Say

  1. I was in search of such post that explain me how can i remove unused css code from my blog template to speed up the blog and i found that info in this post. Good job as a blogger helper. Keep going brother and provide more and more useful tricks……………………

  2. Recipe lover says:

    Thanks, will use this technique on my own blog.

Leave a comment

You must be Logged in to post comment.