I'm trying to use LESS in a Zen sub-theme, but while the CSS files are correctly included (even with a ".less" extension), the LESS rules themselves don't seem to be recognized and processed.
Here's my setup :
- Zen theme installed, and sub-theme created (and activated)
- LESS module installed and enabled (along with Libraries)
- the lessphp library has also been installed, following the instructions on the LESS module page.
In my sub-theme folder, I basically have the following files :
mytheme.info
, which includes thecss/styles.css
below.css/styles.css
: (provided with the Zen Starter Kit) only contains a bunch of import rules; among them I added@import "mytheme.less";
which will be the main CSS (LESS) file for my theme.css/mytheme.less
, in the same folder as thestyles.css
. I used this file to test simple LESS rules.
When I use a normal CSS rule in the mytheme file, it's recognized and displayed normally in the site (e.g. body {color: red;}
. However, even basic LESS rules seem to be simply ignored. Example of code that doesn't work:
@color: red;
body {
color: @color;
}
I'm not familiar with CSS preprocessors, so I don't know if I'm missing anything. Or is the Zen theme somehow incompatible with the LESS module?
So, any help is appreciated. Thanks in advance.