I am trying to add different padding to subsequent elements in a div. My DOM looks pretty simple.
0
Using less(but you have to set the num of elements):
.parent (@indexstart,@index) when (@indexstart < @index ){ div:nth-child(@{indexstart}){ padding-left: (@indexstart - 1) * 15px; } .parent (@indexstart + 1,@index); } .parent (1,4);
See example