Recall & Review
beginner
What is a key limitation of the
@extend directive in Sass?It can only extend selectors that appear earlier in the stylesheet or in imported files. Extending selectors defined later will not work.
Click to reveal answer
intermediate
Why can
@extend cause unexpected CSS output?Because it merges selectors, it can create very long, complex selectors that affect more elements than intended, leading to styling bugs.
Click to reveal answer
intermediate
Can
@extend be used inside media queries?Yes, but the extended selectors must also be inside the same media query. Otherwise, the styles won’t be applied as expected.
Click to reveal answer
beginner
What happens if you try to
@extend a placeholder selector that does not exist?Sass will throw an error because it cannot find the selector to extend.
Click to reveal answer
beginner
How does
@extend differ from mixins in Sass?@extend merges selectors to share styles, while mixins copy properties into the selector. Mixins do not create combined selectors.Click to reveal answer
What does
@extend do in Sass?✗ Incorrect
@extend merges selectors so they share the same CSS rules.Which of these is a limitation of
@extend?✗ Incorrect
@extend can create long combined selectors that may cause unexpected styling.What happens if you
@extend a selector inside a media query but the original selector is outside?✗ Incorrect
The extended selector must be inside the same media query to work properly.
If you try to
@extend a non-existent placeholder selector, what happens?✗ Incorrect
Sass throws an error because it cannot find the selector to extend.
Which is true about
@extend compared to mixins?✗ Incorrect
@extend merges selectors; mixins copy properties into selectors.Explain the main limitations and common gotchas when using
@extend in Sass.Think about order, selector merging, media queries, and errors.
You got /4 concepts.
Compare
@extend and mixins in Sass and describe when you might choose one over the other.Focus on how styles are shared or copied.
You got /5 concepts.