Write maintainable CSS with variables, nesting, mixins, modules, maps, and compiled output.
Lessons
Share styles between selectors via inheritance.
Extending Selectors with @extend is easiest to learn by reading the example, changing it, and observing the result.
.message {
padding: 1rem;
border: 1px solid;
border-radius: 4px;
}
.success {
@extend .message; // shares the selector
border-color: #10b981;
}Practice the Extending Selectors with @extend example in a small scratch file, then explain what changed and why.