SASS-এ সিলেক্টর অংশগুলির সংযোগ
একটি ক্লাসের অংশগুলিকেও সংযুক্ত করা যায়। উদাহরণস্বরূপ, এভাবে:
styles.scss.button {
&-ok {
color: green;
}
&-cancel {
color: red;
}
}
কম্পাইলেশনের পর আমরা পাব নিম্নলিখিত কোড:
styles.css.button-ok {
color: green;
}
.button-cancel {
color: red;
}
Задание 1
নিম্নলিখিত কোডটি সরলীকরণ করুন:
styles.scss.label-success {
color: green;
}
.label-warning {
color: yellow;
}
.label-error {
color: red;
}