The heart of tech

This article was published on June 21, 2011


    CSS Lint points out CSS problems, teaches you to code better

    CSS Lint points out CSS problems, teaches you to code better
    Joel Falconer
    Story by

    Joel Falconer

    Joel Falconer is the Features Editor at TNW. He lives on the Gold Coast, Australia with his wife and three kids and can sometimes be found g Joel Falconer is the Features Editor at TNW. He lives on the Gold Coast, Australia with his wife and three kids and can sometimes be found gaming or consulting. Follow Joel on Twitter.

    There are plenty of CSS tools on the web that look at your code and minify it, validate it, and so on. But CSS Lint is one of the few that’s just as much of a tool for checking your CSS for problems as it is a learning experience.

    When you plop a bunch of CSS into CSS Lint, it combs through for problems, inefficiencies, and syntax errors. Unlike other tools, it doesn’t change your CSS. It just tells you about the problems and inefficiencies that it finds.

    There’s an obvious benefit to tools such as this over tools that automate the code-cleaning process: it’s a teaching utility. Most designers know all about getting the result they want out of CSS but not as much about efficiency or the best syntax to use in every situation; for a long time, web design has been as much about using unorthodox hacks to achieve results as it has been about using CSS and HTML as intended.

    By using CSS Lint, designers can learn to code better and start avoiding the bad habits that have slowed down their CSS in the past.

    Go and chuck the contents of your latest project’s CSS into CSS Lint and see what happens. Are you as efficient as you think you are?