Skip to main content

strip-keywords ()

Strips all named parameters from the given argument list.


The argument list from which to strip all named parameters.

Return Value

Returns the values of an argument list without named parameters.


@use 'sass:list';
@use '@sass-fairy/meta';

// 1. Extend `$list...)` to include `$bracketed` parameter.
@function zip-it($list...) {
$bracketed: meta.get-keyword($list, 'bracketed', auto);

// Keywords must be stripped, otherwise
// they will spread to `` where the are not accepted.
$list: meta.strip-keywords($list);

@return list.join($list, (), $bracketed: $bracketed);

// 2. Consuming the extended function
@debug zip-it(10px 50px 100px, short mid long, $bracketed: true);
// [10px short, 50px mid, 100px long]