无法使LESS递归循环与变量一起正常工作

时间:2015-08-24 17:12:46

标签: javascript html css less

当我尝试编译下面的LESS代码时,我收到以下错误:

SyntaxError: Cannot read property 'numerator' of undefined in

我尝试了所有不同类型的组合,但仍然无法编译LESS。我究竟做错了什么?谢谢,任何方向都会有所帮助。

.generate-heights(@total, @unit, @count: 1) when (@count =< @total) {
    .@{unit}-@{count}{
        height: @total + @unit;
    }
    .generate-heights(@total, @unit, (@count + 1));
}

.generate-heights(100, vh);

0 个答案:

没有答案