travco/postcss-extend

Extending a class doesn't work?

ericdfields opened this issue · 1 comments

This works for me:

@define-placeholder dark-blue-background {
  background-color: #004a6b;
  color: white;
  box-shadow: rgba(255, 255, 255, 0.11) 0 -30px 60px inset;
}

.person__header {
  @extend dark-blue-background;
  padding: 20px 0 1em;
  height: 12vh;
}

This doesn't work, but I'd expect it should based on the docs:

.dark-blue-background {
  background-color: #004a6b;
  color: white;
  box-shadow: rgba(255, 255, 255, 0.11) 0 -30px 60px inset;
}

.person__header {
  @extend .dark-blue-background;
  padding: 20px 0 1em;
  height: 12vh;
}

Error:
``.dark-blue-background, has not (yet) been defined, so cannot be extended

Am I wrong in thinking that the latter should work?

Fixed as part of 3dc789b, turns out there was some slippage in the recusion handler. Mostly my fault for not getting that fix out to the NPM repo.

I'm going to close the issue, but if it persists on your machine feel free to reopen and please reply.