Open tribhuvandurgam opened 4 years ago
.my-app { @import url("variables.less"); color: @text-color; background-color: @body-bg; }
@body-bg: #f1f2f3; @text-color: #5e5e5e;
modifyVars: {"body-bg": 'yellow', 'text-color' : 'purple' }
.my-app { color: #5e5e5e; background-color: #f1f2f3; }
@import url("variables.less"); .my-app { color: @text-color; background-color: @body-bg; }
.my-app { color: purple; background-color: yellow; }
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
style.less
.my-app { @import url("variables.less"); color: @text-color; background-color: @body-bg; }
variables.less
@body-bg: #f1f2f3; @text-color: #5e5e5e;
Compiling with
modifyVars: {"body-bg": 'yellow', 'text-color' : 'purple' }
Style.css is (modifyVars are not considered here)
.my-app { color: #5e5e5e; background-color: #f1f2f3; }
But when import is moved outside the selector in style.less
@import url("variables.less"); .my-app { color: @text-color; background-color: @body-bg; }
Style.css is as expected.
.my-app { color: purple; background-color: yellow; }
How to have the "modifyVars" values honored for import inside class selectors ?