1

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?

1 Answer 1

0

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.

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

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

THEME\web\css\source\lib\extend\variables\_test.less

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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