cloudhead/less — Issue #179: looping
Author: lukeholder
Created: 2011-10-14 19:58:03+00:00
State: open

can you do this is less?

sass example:

```
$starWidth: 44px;
$starOffset: 0 -43px;
$numStars: 5;
$steps: 2;
$total: $numStars * $steps;

@mixin filled($n: 0) {
width: ($starWidth / $steps) * $n;
}

.stars {
background: url(/images/sprite.png) repeat-x top left;
height: 43px;

&.empty {
background-position: $starOffset;
width: $numStars * $starWidth;
}

@for $i from 0 through ($total) {
&.filled_#{$i} { @include filled($i) }
}
}
```