SASS හි සියුඩෝක්ලාස් එකට එකතු කිරීම
සියුඩෝක්ලාස් සමඟ වැඩ කරන විට ඇම්පර්සෑන්ඩ් භාවිතා කිරීම පහසුය. උදාහරණය බලන්න:
styles.scssa {
color: blue;
&:hover {
color: red;
}
}
සම්පාදනය කිරීමේ ප්රතිඵලය:
styles.cssa {
color: blue;
}
a:hover {
color: red;
}
Задание 1
පහත කේතය සම්පාදනය කිරීමේ ප්රතිඵලය කුමක්දැයි පැහැදිලි කරන්න:
styles.scssa.class {
&:link {
color: red;
}
&:visited {
color: blue;
}
&:hover {
color: green;
}
}
Задание 2
දක්වා ඇති කේතය සරල කරන්න:
styles.css#block {
width: 300px;
}
#block a:link, #block a:visited {
color: red;
}
#block a:hover {
color: blue;
}