-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending a %placeholder containing a parent reference produce incorrect output #1063
Comments
I can confirm this issue is present in Libsass 3.2.0-beta.5 |
You can test for regressions with http://sassmeister.com/ (this one is a plain bug) |
Spec added sass/sass-spec#320 |
This appears to be a problem with deduping selectors during extending. This test case can be simplified to %foo {
& > x { display: block; }
}
a {
> b { @extend %foo; }
> b > c { @extend %foo; }
} Given this code we appear to be incorrectly deduping |
This issue with the & parent selector appears not only when extending placeholders, it seems to also happen when the parent selector is generated on the fly and using I have this source:
The expected output should be (and what Ruby Sass 3.4.13 gives me):
But the result is:
|
Hello
I'm not sure if this problem is new or related to a known one. & Selectors within a placeholder get ignored when the parent selector is generated on the fly. This is a simplyfied version of what we use to generate navigations. (eg. first level horizontally, second megamenu, third vertically, ...)
This is what libsass renders
And in comparission the sass output as I would expect it
Interestingly the behaviour changes when we add a class inside the loop
And it's only the & Selector thats broken. If I add another selector to the placeholder the new one works.
The text was updated successfully, but these errors were encountered: