SASS හි උරුමකම් ක්රියාකාරීත්වයේ මූලධර්ම
@extend නිර්දේශයේ ක්රියාකාරීත්වයේ සාරය නම්,
එය පුළුල් කළ හැකි තේරීම්කරු (අපගේ උදාහරණයේ දී .warning)
හමුවන ඕනෑම විලාසිතා කට්ටලයකට පුළුල් කරන තේරීම්කරු එකතු කිරීමයි:
අපි උදාහරණයක් බලමු:
.warning {
border: 1px solid;
background-color: #ffd900;
}
.warning .instruction {
background-image: url("/image/warning.png");
}
.personalWarning {
@extend .warning;
border-width: 3px;
}
දැන් අපි සම්පාදනය කිරීමේ ප්රතිඵලය බලමු:
.warning, .personalWarning {
border: 1px solid;
background-color: #ffd900;
}
.warning .instruction, .personalWarning .instruction {
background-image: url("/image/warning.png");
}
.personalWarning {
border-width: 3px;
}
පහත කේතයේ සම්පාදන ප්රතිඵලය කුමක්දැයි පැහැදිලි කරන්න:
#product-card p{
color: #460707;
padding: 10px;
}
#product-card-title {
@extend #product-card;
font-weight: 600px;
}
පහත කේතයේ සම්පාදන ප්රතිඵලය කුමක්දැයි පැහැදිලි කරන්න:
.link .main-block{
font-size: 14px;
text-decoration: dashed;
}
.active-link {
@extend .link;
color: red;
}
පහත කේතයේ සම්පාදන ප්රතිඵලය කුමක්දැයි පැහැදිලි කරන්න:
.link .main-block{
font-weight: bold;
text-decoration: none;
}
.active {
color: red;
}
.active-link {
@extend .link;
@extend .active;
}