meta.call($function, $args...)invokes a function value with the given arguments and returns the result. Get the function value from meta.get-function() (or meta.module-functions()). Load it with @use "sass:meta".
Official sample idea.
A remove-where($list, $condition) helper calls meta.call($condition, $element) for each item—for example filtering font names that contain “Helvetica”.
String names are deprecated.
Passing a string function name to call() still works, but Sass deprecates it and will disallow it later. Prefer meta.get-function then meta.call.
Returns a value.
Unlike meta.apply (mixins / CSS), meta.call is an expression that yields a result you can assign or emit.
Syntax
Syntax
SCSS
@use "sass:meta";
meta.call($function, $args...); //=> value
@function double($n) {
@return $n * 2;
}
meta.call(meta.get-function("double"), 8px); // 16px
// Deprecated: meta.call("double", 8px);
// Prefer get-function first
// Global alias (legacy): call($function, $args...)
// Prefer meta.call after @use "sass:meta"
Pattern: resolve a function value → meta.call with args → use the returned value. For mixins, use meta.apply instead.
Reference
call vs apply
Same dynamic idea, different member types:
Helper
Runs
How you use it
meta.call
Function value
Expression / assignment — returns a value
meta.apply
Mixin value
@include meta.apply(...) — emits CSS / can take @content
meta.get-function
—
Builds the function value you call
String name to call
—
Deprecated; prefer get-function
Higher-order helpers.
Pass a function value into another function (like a condition callback), then invoke it with meta.call inside the loop.
Pair with get-function; avoid deprecated string names.
Use for higher-order helpers; use apply for mixins.
Module form via @use "sass:meta".
One line: when a function value must be invoked dynamically, call meta.call($function, $args...).
Practice
Compile Notes
Practical checklist:
checklist.txt
1. @use "sass:meta"
2. Resolve a function value (get-function / module-functions)
3. meta.call($fn, $args...)
4. Do not pass a string name (deprecated)
5. Use meta.apply for mixin values
Frequently Asked Questions
meta.call($function, $args...) invokes a function value with the given arguments and returns the result. It is how you run a function when you hold a reference to it instead of writing its name directly.
Use meta.get-function("name") for a function in the current module, or pass $module for a @use namespace. You can also take function values from meta.module-functions.
It still works in current implementations, but Sass marks passing a string name as deprecated. Prefer meta.get-function() first, then meta.call($fn, …). String call() will be disallowed in future versions.
meta.call runs function values and returns a value. meta.apply includes mixin values and emits CSS (and can forward @content). Same dynamic idea, different member types.
Yes. call($function, $args...) is the legacy global name. Prefer meta.call after @use "sass:meta".
Dart Sass fully. LibSass and Ruby Sass support call with function values since about 3.5. Always prefer current Dart Sass for the module system.