You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a router, which calls the appropriate main mixin, depending on the situation
a helper, which calls the original mixin (through the router mixin) with predefined arguments.
It works when I do not use named argument in the helper mixin, but if so, fails on Sass v3.5.0.pre.rc.1 and LibSass v3.5.0.beta.2, 3.5.0.beta.3-54-gdebb1e32.
Works ok in every cases with other Sass versions: Sass v3.3.14, Sass v3.4.21, Sass 4.0.0.alpha.1
Should I do something otherwise?
input.scss
@mixinmain(
$param1: param1,
$param2: param2,
$param3: param3
) {
param1-value: $param1;
param2-value: $param2;
param3-value: $param3;
}
@mixinrouter($args...) {
@if (true) { @includemain($args...) }
@else { @includemain2($args...) }
}
@mixinhelper($args...) {
@includerouter($param2: param__2, $args...)
}
.ordinal-arguments {
/* OK - gets $param2 value from @mixin helper and has the correct $param1 value */@includehelper(param___1);
}
.named-arguments {
/* OK on Sass v3.3.14, Sass v3.4.21, Sass 4.0.0.alpha.1, but fails on Sass v3.5.0.pre.rc.1 and LibSass v3.5.0.beta.2, (gets $param2 value from @mixin helper, but $param1 has only its default value.) (Note: It works on Sass v3.5.0.pre.rc.1 and LibSass v3.5.0.beta.2, when: - in @mixin helper I call "main" instead of "router" (line 17) - or if I do not edit the value of $param 2 (line 17) ) */@includehelper($param1: param___1);
}
/* param1-value should be 'param___1' and param2-value should be param__2 in both cases */
.ordinal-arguments {
/* OK - gets $param2 value from @mixin helper and has the correct $param1 value */param1-value: param___1;
param2-value: param__2;
param3-value: param3;
}
.named-arguments {
/* OK on Sass v3.3.14, Sass v3.4.21, Sass 4.0.0.alpha.1, but fails on Sass v3.5.0.pre.rc.1 and LibSass v3.5.0.beta.2, (gets $param2 value from @mixin helper, but $param1 has only its default value.) (Note: It works on Sass v3.5.0.pre.rc.1 and LibSass v3.5.0.beta.2, when: - in @mixin helper I call "main" instead of "router" (line 17) - or if I do not edit the value of $param 2 (line 17) ) */param1-value: param1;
param2-value: param__2;
param3-value: param3;
}
Expected result
ruby sass 3.4.21
/* param1-value should be 'param___1' and param2-value should be param__2 in both cases */
.ordinal-arguments {
/* OK - gets $param2 value from @mixin helper and has the correct $param1 value */param1-value: param___1;
param2-value: param__2;
param3-value: param3;
}
.named-arguments {
/* OK on Sass v3.3.14, Sass v3.4.21, Sass 4.0.0.alpha.1, but fails on Sass v3.5.0.pre.rc.1 and LibSass v3.5.0.beta.2, (gets $param2 value from @mixin helper, but $param1 has only its default value.) (Note: It works on Sass v3.5.0.pre.rc.1 and LibSass v3.5.0.beta.2, when: - in @mixin helper I call "main" instead of "router" (line 17) - or if I do not edit the value of $param 2 (line 17) ) */param1-value: param___1;
param2-value: param__2;
param3-value: param3;
}
The strange thing is that when nex3 tested locally, got the good results in 3.4.25, 3.5.0-rc.1, 3.5.1, 4.0.0.alpha.1, and bleeding edge 4.0.0. Can I hope that this has been already fixed or should I provide any extra detail?
Reduced test case: https://www.sassmeister.com/gist/44340f52a27ad3e4fe61c9772de66d4f
Simplified: I have three mixins:
main
with a few argumentsrouter
, which calls the appropriatemain
mixin, depending on the situationhelper
, which calls the original mixin (through therouter
mixin) with predefined arguments.It works when I do not use named argument in the
helper
mixin, but if so, fails on Sass v3.5.0.pre.rc.1 and LibSass v3.5.0.beta.2, 3.5.0.beta.3-54-gdebb1e32.Works ok in every cases with other Sass versions: Sass v3.3.14, Sass v3.4.21, Sass 4.0.0.alpha.1
Should I do something otherwise?
input.scss
Actual results
LibSass v3.5.0.beta.2
Expected result
ruby sass 3.4.21
version info:
The text was updated successfully, but these errors were encountered: