list.slash($elements...) returns a slash-separated list that contains $elements. Load it with @use "sass:list" on Dart Sass 1.23+. There is no separate global slash().
Temporary helper.
Official docs: this exists while Sass finishes moving / away from division. Eventually slash lists may be written literally (for example 1px / 2px / solid). For real math, use math.div().
Temporary API until slash literals are fully available.
Module only — no global slash().
One line: when CSS needs a slash-separated value, call list.slash($a, $b, …).
Practice
Compile Notes
Practical checklist:
checklist.txt
1. @use "sass:list"
2. Use list.slash for CSS slash values
3. Use math.div for real division
4. Confirm with list.separator(...) == slash
5. Keep call sites easy to migrate when slash literals arrive
Frequently Asked Questions
list.slash($elements...) returns a slash-separated list containing those elements. Example: list.slash(1px, 50px, 100px) is 1px / 50px / 100px.
Not currently. Official docs describe it as a temporary solution while Sass finishes moving / away from division. It is the supported way to create slash lists today. Later it may become redundant when slash list literals work everywhere.
Use math.div($a, $b) from sass:math. Do not rely on / for division—that path is being phased out in favor of slash as a list separator.
list.separator(list.slash(16, 9)) returns slash.
No. Unlike many other list helpers, slash is provided as list.slash() through the sass:list module (or via @use "sass:list" as *).
Built-in modules with @use need Dart Sass 1.23+. Slash-separated lists and list.slash() arrived as part of the slash-as-division migration—prefer a current Dart Sass release.