Mixins are first-class values in Dart Sass 1.69+. Fetch one with meta.get-mixin(), keep it in a variable or map, hand it to another mixin, and include it later with @include meta.apply().
Because a mixin value is only a reference, you can build wrappers and dispatchers that accept any mixin—for example one that nests a mixin inside a selector.
Include with meta.apply.
A mixin value cannot be used with the plain @include name form. Use @include meta.apply($mixin, $args...), and pass a trailing { ... } block if the mixin takes @content.
Mixins are values you can store, pass, and include later.
meta.get-mixin looks one up; @include meta.apply includes it.
Trailing blocks reach @content when the mixin supports it.
meta.module-mixins returns a map of a module’s mixin values.
One line: look up a mixin with meta.get-mixin(), then include it with @include meta.apply().
Practice
Compile Notes
Practical checklist:
checklist.txt
1. Use Dart Sass 1.69+
2. $m: meta.get-mixin("name")
3. @include meta.apply($m, args...)
4. Pass a trailing block only if accepts-content is true
5. Use $module to reach a mixin in a @use'd file
Frequently Asked Questions
A mixin value is a first-class reference to a mixin. You get one with meta.get-mixin() and include it with @include meta.apply().
Use @include meta.apply($mixin, $args...). The plain @include name syntax does not work for mixin values.
Yes. Add a trailing block after meta.apply(...) when the mixin uses @content. Check with meta.accepts-content() first.
Use meta.get-mixin("name", $module: "namespace") where namespace is the one from @use. meta.module-mixins() returns all of them as a map.
Dart Sass 1.69 and later added meta.get-mixin(), meta.apply(), meta.module-mixins(), and meta.accepts-content().
No. It is not valid CSS. Use meta.inspect() to see it as get-mixin("name") while debugging.