Check your CSS with CSS Lint
Check your CSS with CSS Lint
Written by Mike James   
Sunday, 19 June 2011

CSS is often regarded as the poor relation of HTML and JavaScript. After all it is about nothing more interesting than presentation - but the latest CSS 3 includes features such as animation and 3D that overlap with what you can achieve using JavaScript. 

So if you take it seriously you probably should make an effort to write it correctly. Now there is CSSLint to add to JSLint and others that will scan though your CSS and "hurt your feelings" by pointing out your poor coding. You can try it out by pasting your CSS into the web site, click LINT! and you will see a list of shameful errors that you need to correct listed.

 

CSSLINTMainPage

 

The only problem is that some of the rules used to determine "good CSS" you might want to argue with - the most obvious being "Don't use IDs in selectors". If you want to know the whys and wherefores of the rules in detail then see About CSS Lint.

If you don't agree with the rules the good news is that you can change them. The parser and the rules are all written in JavaScript.  All of the rules use a simple plugin mode and the code is open source see: GitHub . There is also a CSSLint for Node.js that doesn't include a user interface so that you can build it into your own projects.

More Information

csslint.net

 

Banner


Knuth's 22nd 360 Degree Not Christmas Tree Lecture
24/12/2016

Every year Donald Knuth traditionally gives a lecture inspired by some tree-like topic, and even though he gave up the tree theme a year or two ago, the lecture is still called the Christmas Tree Lect [ ... ]



The Weekly Top Ten: More Ruby On Rails
30/12/2016

The I Programmer team tries to cover as many as possible of the languages you might be interested in, but now and then it's good to have outside help. This round up of posts from around the web is foc [ ... ]


More News

Last Updated ( Sunday, 19 June 2011 )
 
 

   
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
Banner