Description
http://lesscss.cn/features/#variables-feature-default-variables
It writes:
We sometimes get requests for default variables - an ability to set a variable only if it is not already set.
This feature is not required because you can easily override a variable by putting the definition afterwards.
For instance:
// library
@base-color: green;
@dark-color: darken(@base-color, 10%);
// use of library
@import "library.less";
@base-color: red;
This works fine because of Lazy Loading - base-color is overridden and dark-color is a dark red.
I don't think the behavior in the example meets the instruction, because the @base-color is already set to green, it shouldn't be reset to red.
So I think the instruction should be:
" We sometimes get requests for default variables - an ability to set a variable only if it is not already set.
This feature is conflicted with 'overriding a variable by putting the definition afterwards', so we couldn't implement the behavior of default variables."