I used security expressions elsewhere in my CSS to retrieve IF statements in LESS, however they do not work for me when trying to declare such variables ...
@neutral: false;
@warm: true;
when (@neutral = true) {
@green:
@red:
etc...
}
when (@warm = true) {
@green:
@red:
etc...
}
This is an example of how I would like to use this variable.
h1 {
color:@green;
}
This is how I expected it to compile before CSS
h1 {
color: #91AD3C;
}
Is this possible with LESS or will I need to change my code in order to use security devices for mixing?
source
share