Documentation for the LESS CSS Preprocessor module.
This module will automatically process any LESS files that are added using drupal_add_css or added through your module/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.
- Libraries API.
- less.php library unpacked so that 'lessc.inc.php' is located at 'sites/all/libraries/lessphp/lessc.inc.php'.
If your source file was "sites/all/modules/test/test.css.less"
Then your compiled file will be "sites/[yoursite_or_default]/files/less/[random.string]/sites/all/modules/test/test.css"
The following two examples provide equivalent functionality.
$module_path = drupal_get_path('module', 'less_demo');
drupal_add_css($module_path . '/styles/less_demo.css.less');
stylesheets[all] = styles/less_demo.css.less