Nối các phần tử chọn trong LESS

Bạn thậm chí có thể nối các phần của một lớp. Ví dụ, như thế này:

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

Kết quả sau khi biên dịch, chúng ta sẽ có mã sau:

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

Hãy đơn giản hóa mã đã cho:

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