travco / postcss-extend

A PostCSS plugin to minimize the number of repeat-selectors and rules you write
MIT License
114 stars 8 forks source link

Error when @extend after @extend #6

Closed jessehattabaugh closed 8 years ago

jessehattabaugh commented 9 years ago

When I extend a placeholder that extends another placeholder at the same time as any other placeholder, I get an empty output file and no error

%foo {
  color: blue;
}
%bar {
  font-size: 12px;
}
%baz {
  @extend %bar;
  background: red;
}

.bam {
  @extend %foo;
  @extend %baz;
}

/* Result Empty */

@extending placeholders that @extend usually works just fine, just not at the same time as other @extends

.bam {
    @extend %baz;
}

/* Result */

.bam {
    font-size: 12px;
}
.bam {
    background: red;
}
travco commented 8 years ago

This somewhat perplexing issue should now be fixed, I've pocket-tested every variation I can come up with recursion among silent selectors and they all work out now.

Sorry for taking so long to get this out for ya, please feel free to reopen and report if it rears it's ugly head again. Should be able to make recursion-fixes now in a couple of days instead of a couple of months.