Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to include the mixin named 'center-content' inside the '.box' class.
SASS
.box {
[1] center-content;
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '@mixin' instead of '@include' to apply a mixin.
Using '@extend' which is for inheritance, not mixins.
✗ Incorrect
Use '@include' to apply a mixin inside a selector in Sass.
2fill in blank
mediumComplete the code to include the mixin 'button-style' with parentheses inside '.btn'.
SASS
.btn {
[1] button-style();
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting parentheses when including a mixin that expects them.
Using '@mixin' which defines, not includes.
✗ Incorrect
Use '@include' with parentheses to include a mixin, even if it has no parameters.
3fill in blank
hardFix the error in including the mixin 'shadow' inside '.card'.
SASS
.card {
[1] shadow;
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Writing 'include' without '@'.
Using '@mixin' which defines a mixin, not includes it.
✗ Incorrect
The correct way to include a mixin is '@include' followed by the mixin name.
4fill in blank
hardFill both blanks to include the mixin 'flex-center' with a parameter 'column' inside '.container'.
SASS
.container {
[1] flex-center([2]);
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '@mixin' instead of '@include' to apply the mixin.
Passing 'row' instead of 'column' as the parameter.
✗ Incorrect
Use '@include' to include the mixin and pass 'column' as the parameter inside parentheses.
5fill in blank
hardFill all three blanks to include the mixin 'text-style' with parameters 'italic' and 'bold' inside '.title'.
SASS
.title {
[1] text-style([2], [3]);
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '@mixin' instead of '@include' to include the mixin.
Swapping the order of parameters or missing the comma.
✗ Incorrect
Use '@include' to apply the mixin and pass 'italic' and 'bold' as parameters inside parentheses separated by a comma.