I am trying to create a mixin that takes several parameters and based on those returns a value. However, I tried testing my less file on http://fiddlesalad.com/less/, but nothing happens.
@volume-color: white;
.volume-color(@media, @volume) {
& when (@media = "novel") {
& when (@volume > 2) {
@volume-color: green;
}
& when (@volume = 1) {
@volume-color: red;
}
}
}
.test {
.volume-color("novel", 1);
color: @volume-color;
}
What am I doing wrong?