Complete the code to make .button inherit styles from .base using @extend.
.base {
color: blue;
}
.button {
[1] .base;
background: white;
}The @extend directive allows .button to inherit styles from .base.
Complete the code to extend .alert styles in .error.
.alert {
border: 1px solid red;
padding: 1rem;
}
.error {
[1] .alert;
background-color: pink;
}@extend is used to inherit styles from .alert inside .error.
Fix the error by completing the code to extend .card styles in .profile-card.
.card {
box-shadow: 0 0 5px gray;
padding: 2rem;
}
.profile-card {
[1] .card;
border-radius: 0.5rem;
}The @extend directive must be followed by a selector and a semicolon to work correctly.
Fill both blanks to extend .base styles in .primary and add a color.
.base {
font-size: 1rem;
font-weight: bold;
}
.primary {
[1] .base;
color: [2];
}@extend .base; shares styles, and color: blue; sets the text color.
Fill all three blanks to create a class .highlight that extends .text, sets color, and font-weight.
.text {
font-size: 1.2rem;
font-weight: normal;
}
.highlight {
[1] .text;
color: [2];
font-weight: [3];
}@extend .text; inherits styles, color: red; sets text color, and font-weight: bold; makes text bold.