Lidhja e pjesëve të selektorit në SASS
Mund të lidhen madje edhe pjesët e një klase të vetme. Për shembull, kështu:
.button {
&-ok {
color: green;
}
&-cancel {
color: red;
}
}
Si rezultat pas kompilimit do të marrim kodin e mëposhtëm:
.button-ok {
color: green;
}
.button-cancel {
color: red;
}
Thjeshtoni kodin e dhënë:
.label-success {
color: green;
}
.label-warning {
color: yellow;
}
.label-error {
color: red;
}