I'm building a mixin in Sass 3.4.5, but its not behaving as I would expect, for example:
@mixin test($values...) {
$items: length($values); // length is 2
@if $items > 1 {
$var: true;
@debug $var; // output is 'true'
}
$var: false !default;
@debug $var; // output is 'false', but it should be 'true'
}
@include test(16, 24);
For some reason $var
gets overridden by !default
, which should not happen.
However, this problem does not happen when I remove the @if
directive.
Any ideas?