LESS conditional variable change inside mixin
问题 I need to achieve such effect, but even when @padding actually < @height it still use multiplier value 2, which is non-sense...Is there any limitation i don't know about? .btn-svg-offset(@height, @padding) { @paddings-n: floor(@height / @padding); @multiplier: 2; & when (@padding < @height) { @multiplier: 1; } @btn-svg-offset: @padding + ((@height / @multiplier) * @paddings-n); }; Any workarounds are welcome) 回答1: & when is not if (they usually say so just for short). & {...} is still a