当我使用默认的 less.js 时,我可以在函数中返回一个变量,例如:
.function(@x,@y) {
.innerFunction() when (@x = @y) {
@output: @x
}
.innerFunction() when not (@x = @y) {
@output: @x/10;
}
.innerFunction() when (...) {
@output: @x + @y;
}
property: @output;
}
这对于创建更复杂的 less 函数非常实用,但它不适用于 lessphp……有没有办法在 lessphp 中返回变量?