In association with heise online

16 June 2011, 11:37

Style check: CSS Lint released

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit


Zoom CSS Lint at work on the web

CSS Lint, an open source tool for checking CSS stylesheets for correctness, has gone online. The tool, which says it "will hurt your feelings (and help you code better)", does basic syntax checking and then applies a set of rules to the code to spot patterns that may be problematic or inefficient.

Rules are pluggable, so the checking can be customised to whatever a developer considers appropriate. Typical rules include that the CSS should parse correctly, there should be no empty rules, adjoining classes should not be used, don't over-use floats or too many web fonts, and vendor prefixed properties should be accompanied by standard versions of those properties. The full list of current rules is available on the csslint.net site. An interface to allow the rules to be selected at run time is also in development.

CSS Lint is written in JavaScript and runs on the Node.js JavaScript web/application server. The developers are inviting users to contribute to the project with new rule ideas and enhancements to the server. CSS Lint is also available as a command line version for integrating with automated build processes. Source code for CSS Lint is available on github and is available under a permissive MIT licence.

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-1261473
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit