This is a preprocessor for LESS files.

Built using the lessphp library by Leaf Corcoran.

This module will automatically process any LESS files that are added using drupal_add_css or added through your theme's .info file.

Add your files just like any other css file, just with .less as the extension, and they will be automatically processed.

7.x-3.0 New Features

There are several new features:

The included less_demo module should provide API demonstration for new features.


  • Download & Install Libraries API.
  • Download lessphp and unpack it so that 'lessc.inc.php' is located at 'sites/all/libraries/lessphp/lessc.inc.php'.
  • Download and install (this) module.


Fully compatible with CSS aggregation:

Drupal 6 "Optimize CSS files" setting under "Administer→Site configuration→Performance" (admin/settings/performance).

Drupal 7 "Aggregate and compress CSS files" setting under "Administration→Configuration→Development→Performance" (admin/config/development/performance)

RTL support will work as long as your files are named "somename.css.less".

Should work with most themes and caching mechanisms.
Confirmed to work with:

LESS Development:



File placement

If your source file was
Then your compiled file will be sites/[default]/files/less/[random.string]/sites/all/modules/test/test.css

If you liked this module try:


  • This project is sponsored by M29

    Project Information