visual studio 2013 - Less Missing closing } -
i have following code , code in less file.
@iterations: 100; .width-loop (@i) when (@i > -1) { (~".w@{i}") { width: ~"@{i}% !important"; } .width-loop(@i - 1); } .width-loop(@iterations);
the result this.
.w100 {width 100% !important; } .w99 {width 99% !important; } ......
etc
however, when build project, error pops in error window.
less: missing closing '}'
where missing }? error window popping distracting.
when view output in browser, style classes list correctly.
you calling function wrong. this:
@iterations: 100; .width-loop (@i) when (@i > -1) { .w@{i} { width: ~"@{i}% !important"; } .width-loop(@i - 1); } .width-loop(@iterations);
Comments
Post a Comment