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;
}