少失踪结束}
Less Missing closing }
我有以下代码,而且我的 Less 文件中只有这段代码。
@iterations: 100;
.width-loop (@i) when (@i > -1)
{
(~".w@{i}")
{
width: ~"@{i}% !important";
}
.width-loop(@i - 1);
}
.width-loop(@iterations);
结果是这样的
.w100 {width 100% !important; }
.w99 {width 99% !important; }
......
等等
但是,当我构建我的项目时,这个错误在我的错误中弹出 window。
Less: Missing closing '}'
我哪里漏了}?弹出的错误 window 最让人分心。
当我在浏览器中查看输出时,样式 类 列表正确。
你调用的函数有误。这样做:
@iterations: 100;
.width-loop (@i) when (@i > -1)
{
.w@{i}
{
width: ~"@{i}% !important";
}
.width-loop(@i - 1);
}
.width-loop(@iterations);
我有以下代码,而且我的 Less 文件中只有这段代码。
@iterations: 100;
.width-loop (@i) when (@i > -1)
{
(~".w@{i}")
{
width: ~"@{i}% !important";
}
.width-loop(@i - 1);
}
.width-loop(@iterations);
结果是这样的
.w100 {width 100% !important; }
.w99 {width 99% !important; }
......
等等
但是,当我构建我的项目时,这个错误在我的错误中弹出 window。
Less: Missing closing '}'
我哪里漏了}?弹出的错误 window 最让人分心。
当我在浏览器中查看输出时,样式 类 列表正确。
你调用的函数有误。这样做:
@iterations: 100;
.width-loop (@i) when (@i > -1)
{
.w@{i}
{
width: ~"@{i}% !important";
}
.width-loop(@i - 1);
}
.width-loop(@iterations);