@extend not honoring nested selectors
When trying to compile the following SASS:
.a {
& > .child {
color: #fff;
}
}
.b { @extend .a; }
I get the following output from libsass 1.0.1 / SassC (installed via brew):
.a > .child {
color: #fff; }
which disagrees with the output from sass (version 3.2.1):
.a > .child, .b > .child {
color: #fff; }
Is this expected?
@forestbelton i think this is fixed now. You may need to get the latest sassc version and recompile with the latest libsass. I was having this same issue with an older compiled version but I just recompiled everything today and it seems to be working. I was also testing this out on sassmeister which now supports libsass. The output there seems to be what you're trying to accomplish.
whoops. i accidentally had sass 3.3.5 used for compiling the output. Correctly using the libsass option, the output is more like this:
.a > .child, .a > .b, .a > .b {
color: #fff;
}
it is strange that it does output the same .a > .b selector twice.
Yeah, even stranger, since the output is not only missing selectors but outputting wrong ones too.
here a gist to reproduce the error: https://gist.github.com/nongio/a04a0bdbdb87c3e36fe4
Is anyone working on this issue? I would like to start contribute. If there is any WIP I would like to give my help.
#146 seems to be where all the @extend-related action is.
Extends is currently implemented incorrectly. There is a $1.2k bounty on issue #146 which covers this broken test case (and many others). I'm closing this to focus on the other issue. If you'd like to submit your code to the sass-spec repo, it could be very useful to help know we've nailed the new implementation.