If you’re a software developer that’s written enough CSS, you quickly begin to miss language features such as variables, operators, and nested rules.
The Less Ruby Gem was the first pass at helping to bring some of this functionality to CSS, but the language, platform, and processing time somewhat hindered the adopting of the utility.
Less.js seeks to mitigate exactly that.
Specifically, Less.js is a JavaScript version of the library that seeks to offer the same functionality as its Ruby counterpart. Check out some example code:
The big win for Less.js is that it’s passing the processing to the client-side. Years ago, I would’ve totally been against this but all of the recent JavaScript engine optimizations have really helped to bring speed to the browser.
On top of that, Dmitry explains that HTML5 is going to help improve performance even more:
On modern browsers that support HTML5, Less.js will cache the generated CSS on local storage, making subsequent page loads as fast as pure CSS.
Although Less.js isn’t officially released yet you can check it out of the GitHub repository or you can go ahead and begin playing with it by including the most recent copy in your project.
[HT: Dmitry Fadeyev]
[…] web developers are a feeling a bit of pain creating stylesheets for their projects, but some have begun to scratch their own itch.Turbine, a PHP-based utility, is a similar project that seeks to ease the […]