Modules
Configure modules and control the public API with @forward.
What you will be able to do
- Use @use for a module’s own dependencies.
- Use @forward to build a public entry point.
- Use !default for configurable variables.
- Hide private members with - or _ prefixes.
In plain English
A module is a file loaded with @use. @forward re-exports another module, optionally hiding internals. Use configuration with !default to theme a module without editing it.
@forward "tokens" show $brand, $space;
@forward "mixins" as mix-*;
// Another file:
// @use "theme" with ($brand: #e4472b);Your turn
EasyForward selected members
Forward only $brand from tokens.
SCSS · starter
@forward "tokens";Check your understanding before moving on.
Knowledge checkQuestion 1
What does @forward do?
Select an answer to continue
Study tools
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.