strip-keywords ()
Strips all named parameters from the given argument list.
Parameters
$args
- The argument list from which to strip all named parameters.
- Type
!ArgList
Return Value
List
- Returns the values of an argument list without named parameters.
Example
@use 'sass:list';
@use '@sass-fairy/meta';
// 1. Extend `list.zip($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 `list.zip()` where the are not accepted.
$list: meta.strip-keywords($list);
$list: list.zip($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]