Tuesday, July 05, 2011

CSS Lint – A Deeper Analysis For CSS Files: "
CSS Lint is an exciting open source project which helps finding the problems and inefficiencies in the CSS code.

As expected, it displays any parsing errors like mis-typed characters which may end-up in non-rendered rules.

CSS Lint

Other than that, CSS Lint checks for the common best CSS coding practices and warns you about the:

  • adjoining classes (which are problematic in IE7 and IE6)
  • empty rules which are inefficient
  • correct use of display (as some rules will be ignored if used together)
  • usage of too many floats, web-fonts and font-size declarations
  • heading styles to be declared once
  • and more..

The rules are pluggable, new ones can easily be added (the web interface is mentioned to be improved soon for making some checks optional).

As the website states "it will hurt your feelings but help coding better" : ).

No comments: