LESS'te Seçici Parçalarını Birleştirme
Hatta bir sınıfın parçalarını bile birleştirebilirsiniz. Örneğin, şu şekilde:
styles.less.button {
&-ok {
color: green;
}
&-cancel {
color: red;
}
}
Derleme sonucunda aşağıdaki kod elde edilecektir:
styles.css.button-ok {
color: green;
}
.button-cancel {
color: red;
}
Задание 1
Aşağıdaki kodu basitleştirin:
styles.less.label-success {
color: green;
}
.label-warning {
color: yellow;
}
.label-error {
color: red;
}