LESS တွင် selector အစိတ်အပိုင်းများကို ချိတ်ဆက်ခြင်း
တစ်ခုတည်းသော class ၏ အစိတ်အပိုင်းများကိုပင် ချိတ်ဆက်နိုင်ပါသည်။ ဥပမာအားဖြင့်၊ ဤကဲ့သို့ဖြစ်သည်-
styles.less.button {
&-ok {
color: green;
}
&-cancel {
color: red;
}
}
ရလဒ်အနေဖြင့် ကွန်ပိုင်းလုပ်ပြီးနောက် ကျွန်ုပ်တို့တွင် အောက်ပါကုဒ်ကို ရရှိပါမည်-
styles.css.button-ok {
color: green;
}
.button-cancel {
color: red;
}
Задание 1
ပေးထားသော ကုဒ်ကို ရိုးရှင်းအောင်ပြုလုပ်ပါ-
styles.less.label-success {
color: green;
}
.label-warning {
color: yellow;
}
.label-error {
color: red;
}