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

@at-root fails to place @content block at root in mixin #1584

Closed
lunelson opened this issue Oct 5, 2015 · 0 comments
Closed

@at-root fails to place @content block at root in mixin #1584

lunelson opened this issue Oct 5, 2015 · 0 comments

Comments

@lunelson
Copy link

lunelson commented Oct 5, 2015

Ran across this today. The previous issue where dynamic classes where not working with @at-root seems to be fixed, but normal usage of @at-root in mixins seems to be broken—or not yet fixed:

@mixin foo($out: false) {
  @if $out {
    @at-root { @content; }
  }
}

@mixin bar() {
  @at-root { @content; }
}

@mixin baz($string) {
  @at-root .#{$string} { @content; }
}

.test {
  @include foo(true) {
    .nest1 {
      color: red;
    }
  }
  @include bar() {
    .nest2 {
      color: green;
    }
  }
  @include baz('nest3') {
    color: blue;
  }
  @at-root {
    .nest4 {
      color: yellow;
    }
  }
}

expected:

.nest1 {
  color: red;
}
.nest2 {
  color: green;
}
.nest3 {
  color: blue;
}
.nest4 {
  color: yellow;
}

actual:

.test .nest1 {
  color: red; }

.test .nest2 {
  color: green; }

.nest3 {
  color: blue; }

.nest4 {
  color: yellow; }
saper added a commit to saper/sass-spec that referenced this issue Oct 5, 2015
@xzyfer xzyfer added this to the 3.3.1 milestone Oct 15, 2015
@mgreter mgreter modified the milestones: 3.3, 3.3.1 Oct 19, 2015
@mgreter mgreter self-assigned this Oct 19, 2015
xzyfer added a commit to xzyfer/sass-spec that referenced this issue Oct 20, 2015
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

4 participants