Tag: LESS

Using LESS To Create Dynamic Stylesheets with Node.js

Have you been working with Cascading Style Sheets (CSS) and found yourself wishing you could make those sheets more, oh, dynamic? Like, for instance, including variables so that you could easily change colors or spacing throughout a stylesheet? There are a number of solutions out there to do this, but one I stumbled upon recently is “LESS“. Here’s a graphic from the LESS site that shows exactly this usage with variables:

less.jpg

You can also do some very cool things with easily nesting rules and creating functions that can calculate values for other rules.

All in all it looks very cool… and it can run either in a client browser or, of more interest to me, server-side using Node.js. I have a site idea where this just might come in handy…

P.S. Any other modules for Node.js for doing stylesheet creation that you all like?