0
0
SASSmarkup~10 mins

Namespace control with @use as in SASS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the file with a namespace.

SASS
@use 'colors' [1];
Drag options to blanks, or click blank then click option'
Aas *
Bas colors
Cwith colors
Dnamespace colors
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'with' instead of 'as' for namespace.
Using 'as *' which imports without namespace.
Trying to use 'namespace' keyword which is invalid.
2fill in blank
medium

Complete the code to use the color variable from the namespace.

SASS
body { color: colors.[1]; }
Drag options to blanks, or click blank then click option'
Aprimary
B$primary
C$colors
Dcolor-primary
Attempts:
3 left
💡 Hint
Common Mistakes
Including the '$' sign when accessing variables from namespace.
Using incorrect variable names.
Trying to access variables without the namespace prefix.
3fill in blank
hard

Fix the error in the import statement to correctly rename the namespace.

SASS
@use 'theme' [1] th;
Drag options to blanks, or click blank then click option'
Aas
Bwith
Crename
Dnamespace
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'with' or 'rename' instead of 'as'.
Omitting the 'as' keyword.
Using 'namespace' keyword which is invalid.
4fill in blank
hard

Fill both blanks to import 'buttons' with a short namespace and use a variable from it.

SASS
@use 'buttons' [1];
.btn { background: [2].$bg-color; }
Drag options to blanks, or click blank then click option'
Aas btn
Bbtn
Cbuttons
Das buttons
Attempts:
3 left
💡 Hint
Common Mistakes
Not using 'as' keyword to rename.
Using the original namespace name instead of the new one.
Trying to access variables without namespace.
5fill in blank
hard

Fill all three blanks to import 'layout' as 'ly', use a mixin, and a variable from it.

SASS
@use 'layout' [1];
.container {
  [2].[3]();
  width: ly.$max-width;
}
Drag options to blanks, or click blank then click option'
Aas ly
Bly
Ccenter-content
Dlayout
Attempts:
3 left
💡 Hint
Common Mistakes
Not renaming the namespace correctly.
Calling mixins without the namespace prefix.
Using wrong mixin or variable names.