Skip to content

Commit

Permalink
fix(function.call-arglist()): fix adding $arguments to the `$arglis…
Browse files Browse the repository at this point in the history
…t` by using only `list.append()` function and checking if `$arglist` is space-separated list, and add to spec.
  • Loading branch information
sciborrudnicki committed Aug 30, 2023
1 parent 1afdab7 commit fd90100
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions function/_function.spec.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ var.$var: map.merge(var.$var, (prefix: s, delimiter: '-'));
// @debug function.call-by-list(5px (var-get primary) 10px (var-get secondary));
// @debug function.call-by-list(5px (--var-get (unit 1)) 10px (--var-get (unit 5)) 1px 2px);
// @debug function.call-by-list(((--var-get: (unit 5, 15, rem)) 15px));
// @debug function.call-by-list((--var-get (unit 5)), $arguments: (dictionary: (unit: u)));

// `function.insert()`
// @debug function.call-by-list(function.insert((padding, (top, bottom)) (), $type-function: (list: selector-nest)));
Expand Down
8 changes: 4 additions & 4 deletions function/call/_call.arglist.function.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
) {
@if $name {
@if $arguments {
$arglist: if(
meta.type-of($arguments) == map,
list.append($arglist, (arguments: $arguments), comma),
list.join($arglist, $arguments, comma)
$arglist: list.append(
if(meta.type-of($arglist) == list and list.separator($arglist) == space, ($arglist,), $arglist),
if(meta.type-of($arguments) == map, (arguments: $arguments), $arguments),
comma
);
}
@if list.separator($arglist) == comma {
Expand Down

0 comments on commit fd90100

Please sign in to comment.