Write maintainable CSS with variables, nesting, mixins, modules, maps, and compiled output.
Lessons
Loop until a condition becomes false.
The @while Loop is easiest to learn by reading the example, changing it, and observing the result.
$i: 1;
$size: 4px;
@while $i <= 5 {
.p-#{$i} { padding: $size * $i; }
$i: $i + 1;
}Practice the The @while Loop example in a small scratch file, then explain what changed and why.