Skip to content

Regression with @extends and @media #2009

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

Closed
xzyfer opened this issue Apr 17, 2016 · 2 comments
Closed

Regression with @extends and @media #2009

xzyfer opened this issue Apr 17, 2016 · 2 comments

Comments

@xzyfer
Copy link
Contributor

xzyfer commented Apr 17, 2016

@mgreter this an extension of #2007 that also regressed in b96723b. It's not fixed by #2008.
Spec sass/sass-spec#771

@mixin breakpoint() {
  @media (min-width: 200px) {
    @content;
  }
}

@mixin foo() {
  @include breakpoint {
    @extend %reveal-centered;
  }
}


foo {
  @include breakpoint {
    %reveal-centered {
      left: auto;
      right: auto;
      margin: 0 auto;
    }
  }

  @include foo;
}

Ruby Sass

@media (min-width: 200px) {
  foo foo {
    left: auto;
    right: auto;
    margin: 0 auto; } }

LibSass

Error: You may not @extend an outer selector from within @media.
       You may only @extend selectors within the same directive.
       From "@extend %reveal-centered" on line 9 of test.scss
        on line 14 of test.scss
>> foo {
@xzyfer
Copy link
Contributor Author

xzyfer commented Apr 17, 2016

I'm finding these by trying to compile foundation.

@mgreter
Copy link
Contributor

mgreter commented Apr 17, 2016

Never running out of edge cases sigh

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