The Sass @forward rule is written @forward "url";. It loads a stylesheet and makes its public mixins, functions, and variables available when your stylesheet is loaded with @use.
That lets you organize a library across many files while users load a single entrypoint. Forwarded members are not available in the forwarding file itself — add @use for the same module if you need them locally (Sass still loads it once).
Official pattern.
Per the Sass docs: write @forward before @use for the same module so consumer with configuration applies to the forward first.
CSS is included.
@forward acts like @use for a module’s CSS — styles ship once, and the forwarding file can even @extend them.
Dart Sass only.
The module system (@use / @forward) is not available in LibSass or Ruby Sass. Prefer Dart Sass for new projects.
Pattern: partial defines members → entrypoint @forwards them → app @uses the entrypoint.
Reference
vs @use & Options
How @forward compares and what it can do:
Form
Meaning
@forward "src/list";
Re-export public members through this file
@forward "…" as list-*;
Prefix every forwarded name (reset → list-reset)
hide / show
Filter which members consumers can see
with ($x: … !default)
Set overridable upstream defaults (Dart Sass 1.24+)
@use (same module)
Also use members in this file; write @forward first
Also used with
Related Rules
Consumers always load you with @use. Prefer modules over legacy @import. Forwarded APIs often expose mixins and functions. Invalid public usage can @error.
Code
SCSS Examples
Multi-file samples show the source module, the forwarding entrypoint, and the consumer. Open View Compiled CSS for verified output.
Example 1 — Basic @forward
Users load bootstrap and get members from src/list.
Write forward first so config still works for consumers.
Module loads once even with both rules.
Edge Cases & Pitfalls
Most @forward bugs are expecting local access, wrong rule order, or using old compilers.
local
Forward ≠ local import
@forward re-exports for downstream @use. To use members in the same file, add @use too.
order
Forward before use
If both appear for the same module, put @forward first so consumer with config applies correctly.
api
Hide internals on purpose
Use hide / show so package-private helpers never become part of the public surface.
libsass
Not in LibSass
Module rules require Dart Sass. Migrate off node-sass / LibSass before relying on @forward.
Toolchain
Sass Support
@forward is part of the Dart Sass module system. It is not a browser CSS feature — support means your Sass compiler understands it.
Implementation
Status
Dart Sass
Supported (recommended)
@forward … with + !default
Dart Sass 1.24.0+
LibSass / node-sass
Not supported
Ruby Sass
Not supported (end-of-life)
Browsers
N/A — only see compiled CSS
Prefer Dart Sass for new projects. SCSS and indented syntax both support @forward.
Remember
Key Takeaways
Entrypoint:@forward re-exports modules for a single @use.
Not local: add @use if this file needs the members too.
Shape the API with as prefix-*, show, and hide.
with (!default) lets wrappers set defaults apps can still override.
One line:@forward turns many partials into one friendly library entrypoint.
Compile
Compile Notes
@forward never reaches the browser. Conceptual flow:
flow.txt
1. Entrypoint @forward's one or more modules
2. Optional: prefix, show/hide, or with (!default) config
3. App @use's the entrypoint (and may configure it)
4. Members appear under the entrypoint namespace
5. Module CSS is included once in the compiled output
Frequently Asked Questions
It loads a Sass stylesheet and makes that module’s public mixins, functions, and variables available to anyone who @use’s your stylesheet. Users can load one entrypoint instead of many files.
No. Those members aren’t available in your module unless you also write @use for the same module. Sass still loads the module only once.
It adds a prefix to every forwarded member name. A mixin named reset becomes list-reset for downstream users (for example bootstrap.list-reset after @use "bootstrap").
They control which members are re-exported. hide lists members to keep private from consumers; show lists the only members to forward. Include $ for variable names.
Yes (Dart Sass 1.24+). It works like @use with (…), and configuration may use !default so downstream stylesheets can still override those defaults.
If you write both for the same module in one file, put @forward first. That way user configuration applies to the @forward before your @use loads the module.