This is a preprocessor for LESS files.
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 ".css.less" as the extension, and they will be automatically processed.
RTL support will work as long as your file extension is ".css.less".
7.x-4.0 Features (PHP 5.3+ required)
- Source Maps - debug to original .less files straight from your browser.
- Less node.js support - the canonical version of Less.
- Autoprefixer support - no more vendor extension mixins needed.
7.x-3.0 Features
There are several new features:
- Live style reload
- Variables editable in UI per theme
Custom LESS functions(only supported with legacy leafo/lessphp)- Correct relative path
@import
: #1331144: Multiple @import does not use expected pathing - Demo module included
The included less_demo
module should provide API demonstration for new features.
Requirements
- Libraries API
- less.php and unpack it so that 'lessc.inc.php' is located at 'sites/all/libraries/lessphp/lessc.inc.php'.
Compatibility
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)
Should work with most themes and caching mechanisms.
Confirmed to work with:
LESS Development:
Syntax
File placement
If your source file was
sites/all/modules/test/test.css.less
Then your compiled file will be sites/[default]/files/less/[random.string]/sites/all/modules/test/test.css
If you liked this module try:
Sponsorship
- This project is sponsored by M29
Project information
- Module categories: Developer Tools
- 9,229 sites report using this module
- Created by corey.aufang on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 7.x-4.x-dev updated 12 Nov 2015 at 01:18 UTC