I have two variable files i.e. component-lib.less and component-override.less.
Ex. component-lib.less
@primary-color: red;
@secodary-color: black;
@background-color: grey;
Ex. component-override.less
@background-color: blue;
@component-padding: 12px;
So whenever I want to use these variable I need to import both files into the target less file.
Ex. Input.less
@import './component-lib.less';
@import './component-override.less';
Input {
padding: @component-padding;
background-color: @background-color;
}
Is there any way where I can import the variable files into one file and then export all variables from there?
Ex. variable.less
@import './component-lib.less';
@import './component-override.less';
@brand-color: orange;
and use it like this,
Ex. Input.less
@import './variable.less';
Input {
padding: @component-padding;
background-color: @background-color;
}