SASS ရှိ အမွေဆက်ခံခြင်း လုပ်ဆောင်ချက်များ၏ အခြေခံမူများ

@extend ညွှန်ကြားချက်၏ အဓိကလုပ်ဆောင်ချက်မှာ ယင်း (ကျွန်ုပ်တို့၏ ဥပမာတွင် .warning) သည် တိုးချဲ့နိုင်သော selector ကို မည်သည့်နေရာတွင်မဆို တိုးချဲ့ခံရသော selector ကိုတွေ့ရှိရာ စတိုင်အုပ်စုများထဲသို့ ပေါင်းထည့်ပေးခြင်းဖြစ်သည်။

ဥပမာတစ်ခုကို ကြည့်ရှုကြပါစို့။

style.scss.warning {
  border: 1px solid;
  background-color: #ffd900;
}
.warning .instruction {
  background-image: url("/image/warning.png");
}
.personalWarning {
  @extend .warning;
  border-width: 3px;
}

ယခု Compile လုပ်ပြီးသောရလဒ်ကို ကြည့်ရှုကြပါစို့။

style.css.warning, .personalWarning {
  border: 1px solid;
  background-color: #ffd900;
}

.warning .instruction, .personalWarning .instruction {
  background-image: url("/image/warning.png");
}
    
.personalWarning {
  border-width: 3px;
}
Задание 1

အောက်ပါကုဒ်၏ Compile လုပ်ပြီးသောရလဒ်သည် အဘယ်နည်း၊ ရှင်းပြပါ။

styles.scss#product-card p{
  color: #460707;
  padding: 10px;
}

#product-card-title {
  @extend #product-card;
  font-weight: 600px;
}
Задание 2

အောက်ပါကုဒ်၏ Compile လုပ်ပြီးသောရလဒ်သည် အဘယ်နည်း၊ ရှင်းပြပါ။

styles.scss.link .main-block{
  font-size: 14px;
  text-decoration: dashed;
}

.active-link {
  @extend .link;
  color: red;
}
Задание 3

အောက်ပါကုဒ်၏ Compile လုပ်ပြီးသောရလဒ်သည် အဘယ်နည်း၊ ရှင်းပြပါ။

styles.scss.link .main-block{
  font-weight: bold;
  text-decoration: none;
}

.active {
  color: red;
}

.active-link {
  @extend .link;
  @extend .active;
}