Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Usage
The following two examples provide equivalent functionality.
drupal_add_css(drupal_get_path('module', 'less_demo') . '/styles/less_demo.css.less');
stylesheets[all][] = styles/less_demo.css.less
By default all files added through the above .info method have any variables associated with the module automatically available when the .less file is compiled.
For automatic variable association with non globally added stylesheets, you can associate a stylesheet using this notation in .info files:
less[sheets][] = relative/path/to/stylesheet.css.less