Open lukeholder opened 12 years ago
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) } } }
can you do this is less?
sass example: