문제

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.

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; }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top