• Facebook Rocks

    Facebook is the best social networking website. ...

  • Google Plus

    Sign up for google plus and see the +1 magic ...

  • Twitter

    twitter.com tweet everything in just one click Sign Up today. ...

  • Mashable

    Mashable.com Latest Web Technology.

  • Wordpress

    Wordpress.org Simple and very Social, Download now ...

How to find unused CSS classes and selectors within a website

Many times we think of using some class or id within a CSS but later on decide not to use them finally. But several times we forget to delete those classes from the CSS file. This may not be a problem for sites where the use of CSS is very less. But this may be accountable for much junk lines within your CSS which are unnecessary and unwanted.

Many times it happens that we use more than one CSS files for a site or application and copy many unused classes or ids. This way the amount of code loaded every time becomes a much considerable value. These unwanted CSS selectors should be deleted from the CSS files. To delete those unused CSS selectors you first need to identify them.

Sitepoint has released a very good tool for this purpose. Dust-Me Selectors is a very useful Firefox Extension which helps you to easily identify those unused CSS selectors. It also has some added advantages. It understands the different ways to include and import CSS files within webpages and also can check inline CSS styles. Importing stylesheets within the IE Conditional Comments is well parsed by this tool. It also understands well known CSS hacks. You can even check a whole site directly with this tool. Just install this Dust-Me Selectors Extension to your Firefox browser and remove the junk codes within your CSS, if any. Make more clean and useful CSS from now.

Categories: , , , ,


Post a Comment