Back to Sass

@for

source/documentation/at-rules/control/for.md

latest328 B
Original Source

{% codeExample 'for' %} $base-color: #036;

@for $i from 1 through 3 { ul:nth-child(3n + #{$i}) { background-color: lighten($base-color, $i * 5%); } }

$base-color: #036

@for $i from 1 through 3 ul:nth-child(3n + #{$i}) background-color: lighten($base-color, $i * 5%) {% endcodeExample %}