less.js
less.js copied to clipboard
modifyVars values are not considered when imports are inside a class selector
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 ?
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.