Recall & Review
beginner
What does the
@forward directive do in Sass?The <code>@forward</code> directive lets you re-export styles, variables, and mixins from one Sass file to another, making them available to files that import the forwarding file.Click to reveal answer
intermediate
How is
@forward different from @import in Sass?@forward re-exports members for other files to use, while @import brings styles directly into the current file. @forward helps organize and control what is exposed to users.Click to reveal answer
intermediate
How do you hide a variable or mixin when using
@forward?Use the
hide keyword with @forward to prevent specific members from being re-exported, e.g., @forward 'colors' hide $secret-color;Click to reveal answer
intermediate
What is the purpose of the
as keyword in @forward?The
as keyword lets you rename members when forwarding, for example: @forward 'buttons' as btn-*; prefixes all forwarded members with btn-.Click to reveal answer
beginner
Can you use
@forward multiple times in one file?Yes, you can use
@forward multiple times to re-export members from different Sass files, helping you create a single entry point for many modules.Click to reveal answer
What does
@forward 'colors'; do in a Sass file?✗ Incorrect
@forward re-exports members so other files importing this file can access them.
Which keyword hides members when using
@forward?✗ Incorrect
The hide keyword hides specific variables or mixins from being re-exported.
How do you rename forwarded members with
@forward?✗ Incorrect
The as keyword adds a prefix or changes the name of forwarded members.
Can
@forward replace @import in modern Sass projects?✗ Incorrect
@forward is used in the new module system to organize and share code, replacing @import.
What happens if you use
@forward multiple times in one file?✗ Incorrect
Multiple @forward directives let you create a single file that re-exports many modules.
Explain how the
@forward directive helps organize Sass code in a project.Think about how you share variables and mixins across files.
You got /4 concepts.
Describe how to hide and rename members when using
@forward.Consider how you might want to keep some things private or change names.
You got /3 concepts.