sass / sassc-ruby

Use libsass with Ruby!
MIT License
363 stars 157 forks source link

"&" doesn't work as expected in `:not()` in mixin #165

Open th0r opened 5 years ago

th0r commented 5 years ago

sassc-ruby v2.2.1

Sass code:

@mixin test {
  & &__elem:not(&__elem_selected) {
    color: red;
  }
}

.foo {
  @include test;
}

.bar {
  @include test;
}

Compiled CSS:

.foo .foo__elem:not(.foo__elem_selected) {
  color: red; }

.bar .bar__elem:not(.foo__elem_selected) {
  color: red; }

Expected CSS:

.foo .foo__elem:not(.foo__elem_selected) {
  color: red; }

.bar .bar__elem:not(.bar__elem_selected) {
  color: red; }