Skip to content
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

"can't extend nested selectors" when using @at-root #2246

Closed
esr360 opened this issue Dec 14, 2016 · 2 comments
Closed

"can't extend nested selectors" when using @at-root #2246

esr360 opened this issue Dec 14, 2016 · 2 comments

Comments

@esr360
Copy link

esr360 commented Dec 14, 2016

Thanks for all of your hard work getting Libsass up-to date with Node-Sass version 3.4 - I have been waiting a long time for this change, but I regret to say my app will still not compile using Libsass.

I am experiencing an issue when using @extend and @at-root, 2 things I know you guys have struggled with at Libsass, so I apologise if you are aware of this issue.

@mixin foo($option: 'foo') {
     // Create a unique, random placeholder to store styles
    $placeholder : $option + random(9999);

    // Store the styles in the placeholder
    @at-root %#{$placeholder} {
        content: 'foo';
    }

    @at-root {
        .bar {
            @extend %#{$placeholder};
        }
    }
}

@mixin bar($option) {
    @include foo($option);
}

.foo {
    @include bar('baz');
}

libsass 3.4.0

Error: Can't extend %foo6595: can't extend nested selectors

ruby sass 3.4.21

.bar {
  content: 'foo';
}

version info:

node - 6.9.1
grunt-sass@2.0.0
@mgreter
Copy link
Contributor

mgreter commented Dec 14, 2016

Thanks for the report. This edge case was not yet covered by our spec tests.
This will be fixed with #2247 (waiting for CI to be fixed first)

@esr360
Copy link
Author

esr360 commented Dec 14, 2016

Amazing, thanks for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants