Performance gurus Nicole Sullivan and Nicholas Zakas have created a web-based tool that analyses your CSS code and detects problems and inefficiencies. Operating the tool is extremely simple: just drop your code into the box and click LINT! to get feedback on your work.
CSS Lint, with the tagline "Will hurt your feelings, and help you code better", is an open source project. It works by applying a set of rules such as "Don't use IDs in selectors" and "Don't use too many web fonts". Soon it will be possible to turn individual rules on and off using the web interface.
The project is available on GitHub, so you can contribute rules and extensions, and build a custom version for yourself by stripping out rules you don't want and adding ones of your own.
If you want to run it on your own system, there is a command line version for Node.js.
You can read more about it in these posts from Nicholas www.nczonline.net/blog/2011/06/15/introducing-css-lint-2/ and Nicole www.stubbornella.org/content/2011/06/15/css-lint-open-sourced/.
Code better with CSS Lint
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1