Write maintainable CSS with variables, nesting, mixins, modules, maps, and compiled output.
Lessons
Use sass:color for modern color manipulation.
The color Module is easiest to learn by reading the example, changing it, and observing the result.
@use 'sass:color';
$brand: #4f46e5;
.button {
background: $brand;
&:hover { background: color.adjust($brand, $lightness: -10%); }
&:active { background: color.adjust($brand, $lightness: -20%); }
border-color: color.mix($brand, white, 70%);
}Practice the The color Module example in a small scratch file, then explain what changed and why.