I would like to use LESS, the CSS preprocessor, with Drupal 7 projects.

What are the required steps to use LESS in Drupal?

share|improve this question

3 Answers

up vote 7 down vote accepted

There is the LESS CSS Preprocessor module for drupal.

share|improve this answer

Note that the mentioned module doesn't use the normal Ruby compiler but a PHP compiler with some differences.

You could also make use of the LESS .js compiler while developing. Just include the .js file supplied by LESS, as explained on their website.

share|improve this answer

Be careful using any LESS modules for Drupal. One error in your less file could bring your whole site down. And it can make debugging a pain in the rear.

Many people, myself included, recommend isolating LESS from Drupal by using a LESS compiler to watch your less files, and compile to pure CSS files that you can deploy to your staging and production servers.

less.js running on node.js works great for my workflow in Ubuntu. The answer above details how to do this.

For Mac, try: http://incident57.com/less/

For Windows, try: http://winless.org/

share|improve this answer
thanks for the tip, +1 – Refineo Feb 24 '12 at 20:08

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.