You are here

README.txt in Less CSS Preprocessor 7.3

Same filename and directory in other branches
  1. 6.3 README.txt
  2. 6.2 README.txt
  3. 7.2 README.txt
LESS CSS Preprocessor
=====================

Files in lessphp/ are from the library at http://leafo.net/lessphp/

The LICENSE file in lessphp/ applies only to files within lessphp/


Requirements
Libraries API.
lessphp library unpacked so that 'lessc.inc.php' is located at 'sites/all/libraries/lessphp/lessc.inc.php'.


LESS Development:

Syntax:
http://leafo.net/lessphp/docs/

File placement:
If your source file was "sites/all/modules/test/test.css.less"
Then your compiled file will be "sites/[yoursite]/files/less/[random.string]/sites/all/modules/test/test.css"

Use:
The following two examples provide equivalent functionality.

drupal_add_css:

<?php
$module_path = drupal_get_path('module', 'less_demo');
drupal_add_css($module_path . '/styles/less_demo.css.less');
?>


.info file:

stylesheets[all][] = styles/less_demo.css.less

For automatic variable and function 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

Compatibility:

Should work with most themes and caching mechanisms.

CSS Aggregation:
Fully compatible with "Optimize CSS files" setting on "Admin->Site configuration->Performance" (admin/settings/performance).

RTL Support:
RTL support will work as long as your file names end with ".css.less".

Assuming your file is named "somename.css.less", Drupal automatically looks for a file name "somename-rtl.css.less"

Variables and Functions:

Variable defaults can be defined in .info files for modules or themes. Any variables defined will be automatically available inside style sheets associated with the module or theme.

.info file:

less[vars][@varname] = #bada55

Look in less.api.php for LESS Variable and Function hooks.

File

README.txt
View source
  1. LESS CSS Preprocessor
  2. =====================
  3. Files in lessphp/ are from the library at http://leafo.net/lessphp/
  4. The LICENSE file in lessphp/ applies only to files within lessphp/
  5. Requirements
  6. Libraries API.
  7. lessphp library unpacked so that 'lessc.inc.php' is located at 'sites/all/libraries/lessphp/lessc.inc.php'.
  8. LESS Development:
  9. Syntax:
  10. http://leafo.net/lessphp/docs/
  11. File placement:
  12. If your source file was "sites/all/modules/test/test.css.less"
  13. Then your compiled file will be "sites/[yoursite]/files/less/[random.string]/sites/all/modules/test/test.css"
  14. Use:
  15. The following two examples provide equivalent functionality.
  16. drupal_add_css:
  17. $module_path = drupal_get_path('module', 'less_demo');
  18. drupal_add_css($module_path . '/styles/less_demo.css.less');
  19. ?>
  20. .info file:
  21. stylesheets[all][] = styles/less_demo.css.less
  22. For automatic variable and function association with non globally added
  23. stylesheets, you can associate a stylesheet using this notation in .info files:
  24. less[sheets][] = relative/path/to/stylesheet.css.less
  25. Compatibility:
  26. Should work with most themes and caching mechanisms.
  27. CSS Aggregation:
  28. Fully compatible with "Optimize CSS files" setting on "Admin->Site configuration->Performance" (admin/settings/performance).
  29. RTL Support:
  30. RTL support will work as long as your file names end with ".css.less".
  31. Assuming your file is named "somename.css.less", Drupal automatically looks for a file name "somename-rtl.css.less"
  32. Variables and Functions:
  33. Variable defaults can be defined in .info files for modules or themes. Any variables defined will be automatically available inside style sheets associated with the module or theme.
  34. .info file:
  35. less[vars][@varname] = #bada55
  36. Look in less.api.php for LESS Variable and Function hooks.