I’ve been a fan of Less for a while now. As a developer it is how I think CSS should have always been. Functions (mixins), Extending objects (nested rules), Operations and Variables.
There are already some great tools for working with less. The obvious one being the Less Ruby Gem:
But there is also the Less.app for Mac and now Less.js. Less.js is a Javascript rewrite of Less and can either be run in the browser or on the server using Node.js.
The watch feature of Less.js in the browser is very cool. This auto-refreshes your styles whenever your Less file changes:
Installation of Less.js in the browser is really rather easy as well. Note however the rel attribute on our style tag:
To be honest I don’t like the idea of relying on Javascript to display styles. And wouldn’t do it in production, but for development it is fantastic. Then when you are ready to deploy to production just convert your less files to static CSS files
If you use a deployment manager such as Phing this could even be an automated part of your build/deployment process.