-
Notifications
You must be signed in to change notification settings - Fork 515
Closed
Labels
Description
I found out that defining the variables were not always set to their last assigned value.
To reproduce:
// main.less
@import variables.less
@textColor: #f90;
@import final.less;
@linkColor: #000;
// variables.less
@linkColor: #fff;
@textColor: #fff;
// final.less
@linkColor: #f90;
Expected
@linkColor is #000;
@textColor is #f90;
Actual
@linkColor is #f90;
@textColor is #fff;
When defining a variable twice, the last definition of the variable is used, searching from the current scope upwards. This is similar to css itself where the last property inside a definition is used to determine the value.
Thanks,
Fred