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:

styles.scss.button {
  &-ok {
    color: green;
  }
  &-cancel {
    color: red;
  }
}

Si rezultat pas kompilimit do të marrim kodin e mëposhtëm:

styles.css.button-ok {
  color: green;
}
.button-cancel {
  color: red;
}
Задание 1

Thjeshtoni kodin e dhënë:

styles.scss.label-success {
  color: green;
}
.label-warning {
  color: yellow;
}
.label-error {
  color: red;
}