| 1 |
@function foo($value, $default: 13, $args...) { |
| 2 |
$res: $value + $default; |
| 3 |
@if length($args) != 0 { |
| 4 |
$res: $res + nth($args, 1); |
| 5 |
} |
| 6 |
@return $res; |
| 7 |
} |
| 8 |
|
| 9 |
.test { |
| 10 |
value: foo(3); // expected: 16 |
| 11 |
value: foo(3, 4); // expected: 7 |
| 12 |
value: foo(3, 4, 5, 6); // expected: 12 |
| 13 |
} |