cloudhead/less.js — Issue #646: Suggestion: support to :for
Author: david-proweb
Created: 2012-02-21 08:52:34+00:00
State: open

Support method :for(start; test; incremental), for instance:

@pageWidth = 1200;
@pageSpace = 40;
@pageParts = @pageWidth / @pageSpace;

:for(@pageSpan = 0; @pageSpan < @pageParts; @pageSpan++) {
.span{@pageSpan}_block {
margin-left: @pageSpan * 10;
}
}

Will make .span0_block, .span1_block, ... .spanN_block.