Write maintainable CSS with variables, nesting, mixins, modules, maps, and compiled output.
Lessons
Repeat output a fixed number of times.
The @for Loop is easiest to learn by reading the example, changing it, and observing the result.
// Generate a 12-column width set
@for $i from 1 through 12 {
.col-#{$i} {
width: percentage($i / 12);
}
}Practice the The @for Loop example in a small scratch file, then explain what changed and why.