Introducing LESS support in Drupal 7 would be a great idea when combine with Bootstrap and Font Awesome. A helper module named "TWBS LESS". The goal of TWBS LESS is to provide a handy support for LESS and act as the helper module for on going Drupal-Bootstrap-Remix development.
Below information is quoted from Edison's blog post.
Key Features
- Provide drush make file for library download
- Confirm library successfully initialized with hook_requirements()
- Support both LTR *.less and RTL *-rtl.less, as like as that of locale_css_alter() supported
- If Drupal's CSS aggregation enabled, all .less will automatically compile at server-side by lessphp as .css before Drupal CSS aggregation
- If Drupal's CSS aggregation disabled, all .less will link with rel set to "stylesheel/less" individually, so less.js will handle with client-side compile
- Support FireLESS for .less debug with Firebug in client-side compile mode
Live Demo
TWBS LESS is now integrated into DruStack distribution, so you can try it in a live sandbox with simplytest.me.
Why Another LESS Module?
For general and generic LESS support you should consider another LESS CSS Preprocessor module which started since 2010-03-04.
On the other hand you should consider about using this module because of:
- Purely design for assist TWBS, which means you will have the best compatibility when using both together
- Support both server-side pre-compile / client-side live-compile with debug mode enable; LESS CSS Preprocessor only support server-side pre-compile
- RTL support with *-rtl.less just as simple as CSS *-rtl.css that Drupal core supported; LESS CSS Preprocessor require it to be named as "somename.css.less" style
- Server-side pre-compile CSS as naming based on its original .less md5_file() result, which means even you add a single space the cache file will also be regenerate; LESS CSS Preprocessor calculate based on filemtime()
- Much simple implementation which handle all LESS support automatically as like as that of Drupal core CSS support; LESS CSS Preprocessor coming with 3.5x times as compare in final downloadable archive size
Author
- Developed by Edison Wong.
- Sponsored by PantaRei Design.
Please feel free to test it out and comment with your idea. Let's enjoy simplified theme development with LESS ;-)