I have these files:

THEME = app\design\frontend\company\base

  • THEME\web\css\source\lib\extend\variables\_typography.less

  • THEME\web\css\source\lib\extend\variables\_colors.less

  • THEME\web\css\source\_extend.less

This is my THEME\web\css\source\_extend.less:

@import 'lib/extend/variables/_colors';
@import 'lib/extend/variables/_typography';

a { color: @theme__color__primary-alt; }

If I make changes in THEME\web\css\source\lib\extend\variables\_colors.less or THEME\web\css\source\lib\extend\variables\_colors.less then they are detected by "grunt watch", but if I modify _extend.less then "grunt watch" does not react at all.

What might be the cause?


It looks like we are not supposed to add code lines into this file other than imports. There must be an exclude in the grunt watch command.

So I created a new file THEME\web\css\source\lib\extend\variables\_test.less and imported it and moved my changes to it.


@import 'lib/extend/variables/_colors';
@import 'lib/extend/variables/_typography';
@import 'lib/extend/variables/_test';


a { color: @theme__color__primary-alt; }
  • import should have extension file at the end ex: @import 'lib/extend/variables/_colors.less'; – mrtuvn Mar 10 '20 at 3:07
  • @mrtuvn, It works without too – Black Mar 11 '20 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.