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

Using @at-root with selectors generates invalid CSS #1749

Closed
raphaelschroiff opened this issue Nov 23, 2015 · 1 comment
Closed

Using @at-root with selectors generates invalid CSS #1749

raphaelschroiff opened this issue Nov 23, 2015 · 1 comment

Comments

@raphaelschroiff
Copy link

I have the following scss:

@mixin device($type) {
  @at-root .device-#{$type} & {
    @content;
  }
}

@include device(phone) {
  .p {
    background-color: red;
  }
}

libsass 3.3.2 generates invalid css out of this:

.device-phone &.p {
  background-color: red; }

compared to libsass 3.2.5:

.device-phone .p {
  background-color: red;
}

However, RubySass 3.4.14 gives me the following error: Base-level rules cannot contain the parent-selector-referencing character '&'.

So an error message would also be ok for me (and the correct behavior I guess)

@xzyfer
Copy link
Contributor

xzyfer commented Dec 1, 2015

Thanks for the report @raphaelschroiff. This appears to be a duplicate. Closing in favour it #1644.

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