Working with Less

Unless you’ve been living under a rock for the last few months, you will have heard of LESS, a dynamic stylesheet language. Well, I’ve been using LESS for the past three months on an almost daily basis so I decided to share my experiences so far.

Like many things on the web, LESS was met with some harsh criticism, mostly by people who hadn’t taken the time to look into it. Of course, if used responsibly, LESS can be a powerful weapon in your web development arsenal.

It took me a while to get into LESS, at first this was because I misunderstood what it actually was because people kept referring to it as Less.js, but then because I couldn’t find a Windows equivalent to the LESS app, until I stumbled across WinLESS.

From this point, LESS couldn’t be any simpler to use, as all it takes to get going is a file with a .less extension along with a .css file with the same name. As LESS can deal with every day CSS it simply outputs your styles as you write them, with the option of minifying them which on a production site is great.

This isn’t even scratching at the surface of what LESS can do though, and different people will use to to different extents. For me, what won me over was the fact that I could write less repetitive code and give up search my stylesheets for hex values, or repeatedly typing vendor prefixes.

I do have some reservations though. For example, especially if you have minified your code, you will need to keep a copy of the same .less files in order for your code to be maintainable. Also I am not sure about how this would work across large teams of developers. But, like I said earlier, if used responsibly, like any other technology on the web, then LESS has the potential to be very powerful indeed.