0
0
SASSmarkup~5 mins

Chained extensions in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a chained extension in Sass?
A chained extension in Sass is when one selector extends another, which itself extends a third selector, creating a chain of shared styles.
Click to reveal answer
beginner
How do you write a simple extension in Sass?
Use @extend followed by the selector you want to inherit styles from, like .button { @extend .base; }.
Click to reveal answer
intermediate
What happens when you chain extensions in Sass?
Sass combines all selectors in the chain so they share the same styles, reducing repeated CSS and keeping code DRY (Don't Repeat Yourself).
Click to reveal answer
advanced
Can chained extensions cause unexpected CSS selectors? Why?
Yes, because Sass merges selectors from all extended classes, sometimes creating complex combined selectors that might affect styling unexpectedly.
Click to reveal answer
intermediate
Why is it important to use chained extensions carefully?
Because overusing or chaining many extensions can create large, complicated CSS selectors that are hard to maintain and may slow down page rendering.
Click to reveal answer
What does @extend do in Sass?
ADefines a new variable
BImports external CSS files
CCopies styles from one selector to another
DCreates a new mixin
If .btn extends .base and .primary extends .btn, what is this called?
AMixin inclusion
BChained extension
CVariable inheritance
DSelector nesting
What is a risk of chaining many extensions in Sass?
ACreating very long CSS selectors
BLosing variable values
CBreaking JavaScript code
DDisabling responsive design
Which Sass feature is best for sharing styles without creating chained selectors?
AMixins
BVariables
CFunctions
DPlaceholders
How does Sass handle selectors when using chained extensions?
AIt converts selectors to IDs
BIt duplicates styles for each selector
CIt ignores the first selector
DIt merges all selectors into combined selectors
Explain what chained extensions are in Sass and how they affect the generated CSS.
Think about how one selector extending another creates a chain.
You got /3 concepts.
    Describe potential problems when using many chained extensions and how to avoid them.
    Consider what happens to CSS selectors as chains grow longer.
    You got /4 concepts.