Write maintainable CSS with variables, nesting, mixins, modules, maps, and compiled output.
Lessons
Write a .scss file and compile it to CSS.
Your First Sass File 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 Your First Sass File example in a small scratch file, then explain what changed and why.