Refactoring Nested CSS Rules using LESS


Posted by Shawn Wildermuth on Sep 10, 2013 on 14:15PM

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:

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




Application Name WilderBlog Environment Name Production
Application Ver 1.0.0.0 Runtime Framework .NETCoreApp,Version=v1.0
App Path D:\home\site\wwwroot Runtime Version .NET Core 4.0.0.0
Operating System Microsoft Windows 6.2.9200 Runtime Arch X86