leafo / scssphp

SCSS compiler written in PHP
MIT License
1.34k stars 214 forks source link

Using @extend creates invalid output with nested classnames in some cases in 0.7.5 #712

Closed bmbrands closed 4 years ago

bmbrands commented 4 years ago

Compiling this scss:

.btn-block {
  + .btn-block {
    margin-top: 1.5rem;
  }
}
.a {
    .b {
        @extend .btn-block;
        margin: auto;
    }
}

generates this css

.btn-block + .btn-blocks, .a .b + .btn-blocks {
  margin-top: 1.5rem; }

Which is not valid because of a selector ending with +

I know this is not the way @extend is advised to be used. I just want to report it as the issue did not exist in earlier versions of scssphp.

robocoder commented 4 years ago

This repo is no longer maintained.

You should open an issue at https://github.com/scssphp/scssphp/issues