Overview - Extend limitations and gotchas
What is it?
In Sass, @extend lets you share styles between selectors by making one selector inherit another's styles. It helps avoid repeating CSS rules. However, @extend has some limits and tricky behaviors that can cause unexpected results if not understood well.
Why it matters
Without knowing @extend's limits, your CSS can become bloated, selectors can combine in strange ways, or styles might not apply as expected. This can make your website look broken or harder to maintain. Understanding these gotchas helps you write cleaner, more predictable styles.
Where it fits
Before learning @extend limitations, you should know basic Sass syntax and how @extend works. After this, you can explore alternative ways to share styles like mixins or functions, and advanced Sass features for better CSS architecture.