skip to main content

TAMU Webmaster's Blog


Information and insight from the A&M Webmasters

LESS and CSS

October 14th, 2011 by Erick Beck

I mentioned the other day that I was hoping that Jeff would return from the HTML5.tx conference with some good ideas. I wasn’t disappointed. Beyond the traditional HTML5 topics that one would expect, there was also a presentation on using LESS for CSS. I had never heard of the project, but its essence is something I had been considering for quite a while.

Simply put, LESS extends traditional CSS, allowing the use of variables, nested css elements, mixins, and more. I won’t try to explain each case, the LESS website does a great job of providing simple examples. A five-minute read of their site convinced me of its usefulness.

Making the project even more extendable, you can either run LESS client-side by downloading a javascript library along with your LESS code, or you can pre-compile the LESS file into traditional CSS and use that with your website like you would any other style sheet.

Since we are already looking at retooling our development portfolio, it’s a no-brainer that we add LESS into the mix. I have no doubt that it will increase the organization of our style sheets, and thereby increase our productivity (and sanity levels while tracking values within large CSS files.)

Friday, October 14th, 2011 CSS
Share this article

2 Comments to LESS and CSS

  1. I’ve been thinking that LESS is a good idea – in general if not in specific – ever since Ben Hunsaker gave his talk “Progressive Enhancement: Designing and Developing in HTML5” at Good Time Charlie’s.

    But for some reason I can’t get myself to embrace it, similar to HAML & SASS. Maybe because the value it adds has a huge hill of value to climb which is the momentum of plain ole CSS. I mean, the worth of a Lingua Franca is great, even to the forgiving of its shortfalls, because of its commonality.

    But perhaps I will be persuaded. Especially if I keep listening to Ben & Jeff. 🙂

  2. Monty on October 26th, 2011
  3. That’s where I would separate how it is used in production vs. how it is used in development. For development it is easy to let the javascript convert the LESS code on the fly. For production, I would definitely use the command line processor to convert the LESS into a standard CSS file and include that onto the page like any other style sheet.

  4. Erick on October 27th, 2011

Leave a comment

Categories

Archives