Cover

Refactoring Nested CSS Rules using LESS

September 10, 2013
No Comments.

One of my favorite features of LESS is the ability to simplify my CSS rules that are deeply nested by using LESS to compose them more simply. I like this feature because it gives me the ability to clean up messy CSS files and make them more maintainable. Take a look to see what I am talking about.

[LESS](http://lesscss.org) is an open-source dynamic stylesheet language for adding features to the CSS language that help you build better CSS. [LESS](http://lesscss.org) parsing is supported in the [free Web Essentials extension](http://visualstudiogallery.msdn.microsoft.com/6ed4c78f-a23e-49ad-b5fd-369af0c2107f) for Visual Studio 2012 and 2013 (though not supported for the Express editions) as well as in the free [WebMatrix](http://www.microsoft.com/web/webmatrix/) tool from Microsoft. It is also supported in most IDEs, as a [JavaScript library](http://lesscss.org) and [even a command-line LESS builder](http://lesscss.org/#usage).

You can view this excerpt from my Pluralsight course covering Web Debugging with Firebug, Fiddler and more.  If you want to view the entire course, you can find it here:

http://pluralsight.com/courses/web-debug