Selektorių dalių sujungimas SASS
Galima sujungti net tos pačios klasės dalis. Pavyzdžiui, taip:
.button {
&-ok {
color: green;
}
&-cancel {
color: red;
}
}
Rezultate, po kompiliavijos, gausime tokį kodą:
.button-ok {
color: green;
}
.button-cancel {
color: red;
}
Supaprastinkite pateiktą kodą:
.label-success {
color: green;
}
.label-warning {
color: yellow;
}
.label-error {
color: red;
}