2

I expect that this LESS

.layout {
  &__sidebar {
    color: red;
  }
}

.layout__sidebar {
  background-color: yellow;
}

.foo {
  &:extend(.layout__sidebar);
}

would end up the .foo class to have both the color and background-color properties to be inherited, but instead that's how it's compiled:

.layout__sidebar {
  color: red;
}
.layout__sidebar,
.foo {
  background-color: yellow;
}

Is it a bug in LESS or am I mis-using it somehow?

Online demo: http://codepen.io/zerkms/pen/vGJvBV

Apparently this is a bug, but as soon as I just posted a bug there is no confirmation for that yet: https://github.com/less/less.js/issues/2857

zerkms
  • 249,484
  • 69
  • 436
  • 539

0 Answers0