Write maintainable CSS with variables, nesting, mixins, modules, maps, and compiled output.
Lessons
Inject variables into selectors, names, and values with #{}.
Interpolation is easiest to learn by reading the example, changing it, and observing the result.
$side: "left";
$name: "primary";
.margin-#{$side} { // .margin-left
margin-#{$side}: 1rem; // margin-left: 1rem
}
.btn--#{$name} {
content: "Theme: #{$name}";
}Practice the Interpolation example in a small scratch file, then explain what changed and why.