LESS and Preprocessors in Drupal 8

Kevin Flanagan

Drupal 7 had a nice way of theming with SASS because it offered the module ????. But Drupal 8 doesn't go this far yet.  Drupal 8 requires a little more work on the backend in order to use pre-processed content that creates CSS files for browsers.

The Bario Bootstrap Theme that is written for Drupal 8 supports the latest version of Bootstrap, 4, and it comes shipped with a subtheme template for creating a LESS based theme.  Fr this reason, I've chosen LESS as my preprocessor despite my own favorite being a more robust language called SCSS.

Installing LESS onto Cent/OS 7


  1. Enable LESS
  2. go into your theme's LESS directory. If one doesn't exist, create it at the same directory level that your theme's CSS file is at,
    ie. cd [YOUR-THEME-DIR]; mkdir less; cd less
  3. Download Deadsimple LESS Watch Compiler by Jony Cheung .... or make a git repository on your server with git