| 1 |
@mixin brokenTest($color: red, $variableArguments...) { |
| 2 |
$width: map-get(keywords($variableArguments), width); |
| 3 |
a { |
| 4 |
width: $width; |
| 5 |
color: $color; |
| 6 |
} |
| 7 |
} |
| 8 |
|
| 9 |
@mixin workingTest($variableArguments...) { |
| 10 |
$width: map-get(keywords($variableArguments), width); |
| 11 |
$color: map-get(keywords($variableArguments), color); |
| 12 |
a { |
| 13 |
width: $width; |
| 14 |
color: $color; |
| 15 |
} |
| 16 |
} |
| 17 |
|
| 18 |
@include brokenTest($width: 30px, $color: blue); // #1 fails |
| 19 |
@include brokenTest($color: blue, $width: 30px); // #2 fails |
| 20 |
@include brokenTest(blue, $width: 30px); // #3 works (!) |
| 21 |
@include workingTest($width: 30px, $color: blue); // #4 works |
| 22 |
@include workingTest($color: blue, $width: 30px); // #5 works |