SASS හි @extend හි දාම දිගු කිරීම්

@extend අණපත අනුක්රමික දිගු කිරීම් ද සහාය දක්වයි, එනම්, එක් තෝරන්නෙකුට වෙනත් තෝරන්නෙකු දිගු කළ හැකි අතර, එය අනෙක් තෝරන්නෙකු විසින් දිගු කරනු ලැබේ. උදාහරණයක් ලෙස:

උදාහරණයක් සලකා බලමු:

style.scss.warning {
  border: 1px solid;
  background-color: #ffd900;
}
.personalWarning {
  @extend .warning;
  border-width: 3px;
}
.systemWarning {
  @extend .personalWarning;
  position: center;
}

සංකලනයේ ප්‍රතිඵලයෙන් අපට පෙනෙන පරිදි, .systemWarning පන්තිය සහිත සියලුම අංගවලට .warning සහ .personalWarning පන්තිවල විලාසයන් ද ඇත:

style.css.warning, .personalWarning, .systemWarning {
  border: 1px solid;
  background-color: #ffd900;
}
.personalWarning, .systemWarning {
  border-width: 3px;
}
.systemWarning {
  position: center;
}
Задание 1

පහත කේතයේ සංකලන ප්‍රතිඵලය කුමක්දැයි පැහැදිලි කරන්න:

styles.scssdiv {
  font-size: 10px;
  color: #181402;
}

.main-block {
  @extend div;
  border: 2px solid orange;
}

#warning-text {
  @extend .main-block;
  margin-top: 10px;
}   
Задание 2

පහත කේතයේ සංකලන ප්‍රතිඵලය කුමක්දැයි පැහැදිලි කරන්න:

styles.scssp {
  padding: 10px;
}

.main-text {
  font-weight: 800px;
}

.card {
  @extend p;
  color: #021338;
}

.product-card {
  @extend .card, .main-text;
  font-size: 12px;
}
Задание 3

පහත කේතයේ සංකලන ප්‍රතිඵලය කුමක්දැයි පැහැදිලි කරන්න:

styles.scssp {
  padding: 5px;
}

.main-text {
  @extend p;
  font-size: 14px;
}

.card {
  @extend .main-text;
  border: 1px solid black;
}

.product-card {
  @extend .card;
  background-color: #e1f1f1;
}