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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -