I want to combine a String and a Variable and Output it as a Variable.
Example:
@color-primary: #ff0000;
/* mixin call */
.create-button-color(primary);
/* mixin */
.create-button-color(@state) {
.button-@{state} {
@state-item: ~"@color-@{state}";
background-color: @state-item;
border-color: @state-item;
}
}
Output:
.button-primary {
background-color: @color-primary;
border-color: @color-primary;
}
As you can see ~"@color-@{state}"
outputs a String, but i need a Variable.
How i could do that?