LESS-da selektor qismlarini birlashtirish

Hatto bir sinfning qismlarini ham birlashtirish mumkin. Masan, shunday:

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

Natijada, kompilyatsiyadan so'ng bizga quyidagi kod hosil bo'ladi:

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

Keltirilgan kodni soddalashtiring:

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