Book Image

Less Web Development Cookbook

Book Image

Less Web Development Cookbook

Overview of this book

Table of Contents (19 chapters)
Less Web Development Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Analyzing your code with CSS Lint


Less compiles into valid CSS, but note that "valid" does not always mean you will have compiled code of the highest quality. Lint your final CSS code with CSS Lint; this will help you to find possible issues and prevent you from making common mistakes. It not only checks your code for possible errors, such as double or empty properties, but also checks for compatibility and looks for problematic patterns or signs of inefficiency.

CSS Lint applies a set of rules to your code; all rules are optional and you can even write your own rules. It also has rules to check the maintainability and accessibility of your code. Finally, CSS Lint applies some rules that are based on the principles of Object Oriented CSS (OOCSS). More information about OOCSS can be found at http://www.smashingmagazine.com/2011/12/12/an-introduction-to-object-oriented-css-oocss/.

Getting ready

The only requirement for this recipe is to have the CSS Lint plugin installed and loaded in the Gruntfile...