The Sass @use rule loads mixins, functions, and variables from other stylesheets — called modules — and combines their CSS. Write @use "url";. Loaded CSS is included exactly once, no matter how many times the module is used.
Members are namespaced by default (last URL segment), so short names like $radius stay safe. Prefer @use over deprecated @import. Re-export many modules from one entrypoint with @forward.
Official pattern.
Per the Sass docs: put @use (and @forward) before other rules. You may declare variables used for configuration before @use.
File-local members.
Loaded members are only visible in the stylesheet that wrote @use. Other files need their own @use (or a shared @forward entry).
Dart Sass only.
@use requires Dart Sass 1.23+. LibSass and Ruby Sass do not support it — they must keep using @import.
Pattern: load a module → access members as namespace.$var, namespace.fn(), or @include namespace.mixin.
Reference
Namespaces & Config
Core @use shapes:
Form
Meaning
@use "src/corners";
Load once; namespace = last URL segment
@use "src/corners" as c;
Custom short namespace
@use "src/corners" as *;
No namespace (best for your own files)
@use "library" with ($x: …);
Configure !default variables on first load
@use "sass:math";
Built-in module (math, color, string, …)
$-private: 1px;
Private member (leading - / _)
Also used with
Related Rules
Pair with @forward for library entrypoints. Prefer this over deprecated @import. Modules commonly expose mixins and functions. Built-ins include math.div.
Code
SCSS Examples
Multi-file samples show both the module and the loading file. Open View Compiled CSS for verified output.
code {
padding: 0.25em;
line-height: 0;
}
ul, ol {
text-align: left;
}
ul ul, ul ol, ol ul, ol ol {
padding-bottom: 0;
padding-left: 0;
}
How It Works
Both modules contribute CSS to the output.
Nested & & expands every parent pair.
Loading again elsewhere will not duplicate this CSS.
Partials can omit the leading _ in the URL.
Edge Cases & Pitfalls
Most @use bugs are rule order, late configuration, or expecting @import-style globals.
order
@use must come first
Except for @forward (and variables used to configure modules), put @use before other rules.
with
Configure only on first load
If another file already loaded the module, a later with is ignored. Configure at the entrypoint.
scope
Not global like @import
Members stay in this file. Other sheets need their own @use or a shared @forward API.
libsass
Not in LibSass
Module rules need Dart Sass. Migrate off node-sass before relying on @use.
Toolchain
Sass Support
@use is the heart 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 since 1.23.0 (recommended)
LibSass / node-sass
Not supported — use @import
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 @use.
Remember
Key Takeaways
Load once:@use namespaces members and includes CSS only once.
Access asns.$var, ns.fn(), @include ns.mixin.
Shape the load with as, as *, and with.
Prefer @use over deprecated @import for all new work.
One line:@use is how modern Sass loads modules — clear namespaces, CSS once.
Compile
Compile Notes
@use never reaches the browser. Conceptual flow:
flow.txt
1. Place @use / @forward at the top of the file
2. Resolve the URL (partials, load paths, built-ins)
3. Apply with (…) config on first load only
4. Expose members under the chosen namespace
5. Emit the module’s CSS once in the compiled output
Frequently Asked Questions
The @use rule loads mixins, functions, and variables from another Sass stylesheet (a module) and combines CSS from multiple stylesheets. Each module’s CSS is included exactly once.
By default, use the last part of the URL as a namespace: @use "src/corners"; then corners.$radius, corners.rounded(), or @include corners.rounded.
It loads a module without a namespace so members are available as $radius or @include rounded. Prefer this only for your own stylesheets to avoid name conflicts.
Define variables with !default in the module, then load with @use "library" with ($black: #222, $border-radius: 0.1rem). Configuration can only be applied the first time a module is loaded.
@use namespaces members, loads CSS once, and keeps members private to the loading file. @import is the older global system. Prefer @use (and @forward) for new code.
Dart Sass since 1.23.0. LibSass and Ruby Sass do not support @use—users of those implementations must use @import instead.