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
Libsass fails to compile a stylesheet if you try to use the nth() function with & as the first argument; it works if you assign & to a variable first. This is inconsistent with Ruby Sass.
Output (same in Libsass 3.2.4 and Ruby Sass 3.4.13):
.qux {
color: whitesmoke;
}
This might be related to the issue with @at-root and interpolation (#1043, #1210), though it's closer to how Libsass behaved until 3.2.2 (when interpolated in @at-root, the value of & would simply be ignored), not the current behavior, from 3.2.3 (the value of & is output, but the selector is nested inside its parent, not the root of the stylesheet).
UPDATE: This seems to be another instance of the issue in #1260 and #1122, i.e. & fails in the context of function arguments.
The text was updated successfully, but these errors were encountered:
Libsass fails to compile a stylesheet if you try to use the
nth()
function with&
as the first argument; it works if you assign&
to a variable first. This is inconsistent with Ruby Sass.Rationale:
According to the docs (http://sass-lang.com/documentation/Sass/Script/Functions.html#selector_parse-instance_method),
&
returns a Sass::Script::Value::List.nth()
takes a list as its first argument.Example:
Expected output (from Ruby Sass 3.4.13):
Result in Libsass 3.2.4: Error — "invalid selector after & on line 3 at column 43"
When I use
nth()
with a list that was declared manually, Libsass and Sass behave consistently. For instance, if I save the value of&
in a variable:Output (same in Libsass 3.2.4 and Ruby Sass 3.4.13):
This also works on Libsass 3.2.4, as expected:
Output (same in Libsass 3.2.4 and Ruby Sass 3.4.13):
This might be related to the issue with@at-root
and interpolation (#1043, #1210), though it's closer to how Libsass behaved until 3.2.2 (when interpolated in@at-root
, the value of&
would simply be ignored), not the current behavior, from 3.2.3 (the value of&
is output, but the selector is nested inside its parent, not the root of the stylesheet).UPDATE: This seems to be another instance of the issue in #1260 and #1122, i.e.
&
fails in the context of function arguments.The text was updated successfully, but these errors were encountered: