Write maintainable CSS with variables, nesting, mixins, modules, maps, and compiled output.
Lessons
Use the sass command to build and watch files.
Compiling with the Sass CLI is easiest to learn by reading the example, changing it, and observing the result.
// Install Dart Sass: npm install -D sass
// Compile once: npx sass src/styles.scss dist/styles.css
// Watch for changes: npx sass --watch src:dist
// styles.scss
$brand: #4f46e5;
body {
color: $brand;
}Practice the Compiling with the Sass CLI example in a small scratch file, then explain what changed and why.