$i: 6; @while $i > 0 { .item-#{$i} { width: 2em * $i; } $i: $i - 2; }
$backgrounds: (home, 'home.jpg'), (about, 'about.jpg'); @each $id, $image in $backgrounds { .photo-#{$id} { background: url($image); } }
$menu-items: home about contact; @each $item in $menu-items { .photo-#{$item} { background: url('#{$item}.jpg'); } }
@for $i from 1 through 4 { .item-#{$i} { left: 20px * $i; } }