CSS Lint
| | |

Improve your CSS coding with CSS Lint

If you’re a website designer, a WordPress theme developer or just a single site owner, you’ll most likely be using a whole set of CSS styles to generate that perfect design.

But, before you’ve got that design ready to deploy across your site(s) or provide for users it is a good idea to check your styles for consistency and compatibility especially since we’re in a world with several different browsers on different operating systems on different devices.

CSS Lint is an open source CSS code quality tool that performs static analysis of source code and flags patterns that might be errors or otherwise cause problems for the developer.

CSS Lint points out problems with your CSS code. It does basic syntax checking as well as applying a set of rules to the code that look for problematic patterns or signs of inefficiency. The rules are all pluggable, so you can easily write your own or omit ones you don’t want.

CSS Lint

All you need to do is paste your CSS code and run the tool and it will quickly display a whole set of potential errors and warnings. e.g. I ran the code on the CSS template of the theme we have at Techtites and I received a whole set of warnings as above. You can pick and choose which errors and warnings to test for.

As the site says, CSS Lint will hurt your feelings, but it will definitely help you code better!

[Via: Smashing Magazine]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.