0
0
SASSmarkup~5 mins

Extending vs mixing comparison in SASS - Quick Revision & Key Differences

Choose your learning style9 modes available
Recall & Review
beginner
What does @extend do in Sass?

@extend lets one selector inherit the styles of another selector, combining their CSS rules in the output.

Click to reveal answer
beginner
How does @mixin differ from @extend in Sass?

@mixin copies a block of styles wherever it is included, while @extend merges selectors to share styles.

Click to reveal answer
intermediate
What is a key advantage of using @mixin over @extend?

@mixin can accept parameters, making styles reusable with variations.

Click to reveal answer
intermediate
What is a downside of using @extend in Sass?

@extend can create complex combined selectors that may increase CSS file size and affect specificity.

Click to reveal answer
beginner
When should you prefer @mixin instead of @extend?

Use @mixin when you need style variations or want to avoid complex selector combinations.

Click to reveal answer
What happens when you use @extend in Sass?
AIt merges selectors sharing the same styles.
BIt copies styles as a separate block.
CIt creates a new CSS file.
DIt deletes unused styles.
Which Sass feature allows passing parameters to customize styles?
A<code>@extend</code>
B<code>@import</code>
C<code>@function</code>
D<code>@mixin</code>
Which is a potential downside of @extend?
ACreates duplicate CSS rules.
BMerges selectors causing complex CSS.
CDoes not work with variables.
DCannot accept parameters.
If you want to reuse styles with different colors, which should you use?
A<code>@mixin</code>
B<code>@extend</code>
CPlain CSS classes
DCSS variables only
Which Sass feature helps reduce CSS file size by merging selectors?
A<code>@mixin</code>
B<code>@include</code>
C<code>@extend</code>
D<code>@function</code>
Explain the main differences between @extend and @mixin in Sass.
Think about how styles are reused and how the final CSS looks.
You got /4 concepts.
    Describe a situation where using @mixin is better than @extend.
    Consider when you want to change colors or sizes dynamically.
    You got /3 concepts.