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]( is an open-source dynamic stylesheet language for adding features to the CSS language that help you build better CSS. [LESS]( parsing is supported in the [free Web Essentials extension]( for Visual Studio 2012 and 2013 (though not supported for the Express editions) as well as in the free [WebMatrix]( tool from Microsoft. It is also supported in most IDEs, as a [JavaScript library]( and [even a command-line LESS builder](

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: