Closed gerardreches closed 8 years ago
In Less before v2.x
, the color keywords (i.e .black
and white
in your example) were always interpreted as actual color values (and never as generic identifiers). For more details see https://github.com/less/less.js/issues/1595.
Workaround: use escaping, e.g. ~'black'
and ~'white'
.
Thanks Max :+1: So less.php compiles in a previous version than 2.x ?
It's (the latest version) less or more equal to 1.7.x
(actually its version -> Less version + "build number").
I've compiled LESS on Magento 2, the bug happens when using @@variable
instead of right way is @variable
.
I got this error in Magento 2 when I call a LESS function and passed in a variable without making it a string: escape(@variable)
caused an error; escape("@{variable}")
removed the error
I get an _Undefined property: Less_TreeColor::$value exception with this code:
This code is compiled correctly at lesscss.org demo but not in my project and neither on less.php demo (here it throws variable @ is undefined).
Am I missing something? Is there a workaround?
EDIT: If I change
background-color: @@name;
tobackground-color: @name;
it works on less.php but not in Less.