假设
.spacer(@property,@val){
@val: @val1, @val2, @val3, @val4;
.mixin() when (length(@list) = 2){
@{property}:extract(@list, 1 2);
}& when (length(@val) = 3){
@{property}:extract(@list, 1 2 4);
}
.mixin();
}
.spacer(margin,2 1); 可以提取两个值吗?
- less.js 2.5.3; Windows 7的;编译器没赢。