Lidhja e pjesëve të selektorit në LESS
Mund të lidhen edhe pjesët e një klase. Për shembull, kështu:
styles.less.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.less.label-success {
color: green;
}
.label-warning {
color: yellow;
}
.label-error {
color: red;
}