To reproduce:
Playground link: https://lesscss.org/less-preview/#eyJjb2RlIjoiLmZvbyB7XG4gIEBmaW5rOiAjZmZmO1xuICBjb2xvcjogJ0B7ZGFya2VuKEBmaW5rLCA1MCUpfSc7XG59IiwiYWN0aXZlVmVyc2lvbiI6IjQuMy4wIiwibWF0aCI6InBhcmVucy1kaXZpc2lvbiIsInN0cmljdFVuaXRzIjpmYWxzZX0=
.foo {
@fink: #fff;
color: '@{darken(@fink, 50%)}';
}
Current behavior:
Compiles to the following with no errors:
.foo {
color: '@{darken(@fink, 50%)}';
}
The value of .foo's color property is not interpolated with the value of @fink and is instead the exact same string as the input, down to keeping the @{} interpolation syntax.
Expected behavior:
A parse error on line 3, color: '@{darken(@fink, 50%)}';, given that invoking a function within the variable interpolation syntax is invalid.
Environment information:
less version: v4.3.0
nodejs version: n/a
operating system: n/a
To reproduce:
Playground link: https://lesscss.org/less-preview/#eyJjb2RlIjoiLmZvbyB7XG4gIEBmaW5rOiAjZmZmO1xuICBjb2xvcjogJ0B7ZGFya2VuKEBmaW5rLCA1MCUpfSc7XG59IiwiYWN0aXZlVmVyc2lvbiI6IjQuMy4wIiwibWF0aCI6InBhcmVucy1kaXZpc2lvbiIsInN0cmljdFVuaXRzIjpmYWxzZX0=
Current behavior:
Compiles to the following with no errors:
The value of
.foo'scolorproperty is not interpolated with the value of@finkand is instead the exact same string as the input, down to keeping the@{}interpolation syntax.Expected behavior:
A parse error on line 3,
color: '@{darken(@fink, 50%)}';, given that invoking a function within the variable interpolation syntax is invalid.Note
To do what this attempts to do, you must invoke the function separately in a variable and then interpolate that variable:
(Playground: https://lesscss.org/less-preview/#eyJjb2RlIjoiLmJhciB7XG4gIEBmaW5rOiAjZmZmO1xuICBAYmluazogZGFya2VuKEBmaW5rLCA1MCUpO1xuICBjb2xvcjogJ0B7Ymlua30nO1xufSIsImFjdGl2ZVZlcnNpb24iOiI0LjMuMCIsIm1hdGgiOiJwYXJlbnMtZGl2aXNpb24iLCJzdHJpY3RVbml0cyI6ZmFsc2V9)
Environment information:
lessversion: v4.3.0nodejsversion: n/aoperating system: n/a