Write maintainable CSS with variables, nesting, mixins, modules, maps, and compiled output.
Lessons
Solve beginner Sass problems and explain each result.
Sass Practice Problems is easiest to learn by reading the example, changing it, and observing the result.
$brand: #4f46e5;
$space: 1rem;
@mixin card {
border-radius: 8px;
padding: $space;
box-shadow: 0 10px 30px rgb(15 23 42 / .12);
}
.lesson-card {
@include card;
border-color: $brand;
&:hover {
box-shadow: 0 14px 40px rgb(15 23 42 / .18);
}
}Practice the Sass Practice Problems example in a small scratch file, then explain what changed and why.