Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extending concatenated selectors #2857

Closed
zerkms opened this issue Mar 31, 2016 · 2 comments
Closed

Extending concatenated selectors #2857

zerkms opened this issue Mar 31, 2016 · 2 comments

Comments

@zerkms
Copy link

zerkms commented Mar 31, 2016

Assuming that I have a LESS like this

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

.layout__sidebar {
  background-color: yellow;
}

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

I expect it to be compiled into

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

but it compiles to

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

What my expectations are based on:

  1. on the documentation about :extend
  2. on the fact that something very similar works fine
.layout {
  &.sidebar {
    color: red;
  }
}

.layout.sidebar {
  background-color: yellow;
}

.foo {
  &:extend(.layout.sidebar);
}

Codepen demos:

  1. with classname string concatenation http://codepen.io/zerkms/pen/vGJvBV
  2. with just combination of class names http://codepen.io/zerkms/pen/oxeJYP

Would you consider this a bug? If not, it must be explicitly noted in the documentation that the selector strings concatenation does not work with :extend

Thanks.

PS: I also asked a question on stackoverflow http://stackoverflow.com/q/36322581/251311

@Justineo
Copy link
Contributor

This might be another duplicate of #2200. I believe this is a frequently requested feature but now there are several major feature requests with nobody ready to implement (for quite a long time). I know the core team have no obligations to do anything, but it's really hard to expect some random users from the community to drive the project forward.

@zerkms
Copy link
Author

zerkms commented Mar 31, 2016

It is a duplicate indeed, thank you.

@zerkms zerkms closed this as completed Mar 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants