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

:extend(... all) doesn't work reliably #2328

Closed
berarma opened this issue Dec 10, 2014 · 2 comments
Closed

:extend(... all) doesn't work reliably #2328

berarma opened this issue Dec 10, 2014 · 2 comments

Comments

@berarma
Copy link

berarma commented Dec 10, 2014

Following LESS code:

.a {
  margin: 0;
}
.b {
  padding: 0;
}
.a .b {
  margin: 10;
}
.c:extend(.a all) {}
.d:extend(.b all) {}

produces:

.a,
.c {
  margin: 0;
}
.b,
.d {
  padding: 0;
}
.a .b,
.c .b,
.a .d {
  margin: 10;
}

Instead of:

.a,
.c {
  margin: 0;
}
.b,
.d {
  padding: 0;
}
.a .b,
.c .b,
.a .d,
.c .d {
  margin: 10;
}

Notice the lack of ".c .d" selector in the first output.

This complicates using Bootstrap in a semantic way. Example:

.mypanel:extend(.panel all, .panel-default all) {}
.mypanel-heading:extend(.panel-heading all) {}

needs to become:

.mypanel:extend(.panel all, .panel-default all) {}
.mypanel-heading:extend(.panel-heading all, .panel-default > .panel-heading all) {}

Tested on less 1.7.5 and 2.1.1. I'm new to LESS. I couldn't find any existing issue that I could relate to this.

@seven-phases-max
Copy link
Member

See #1952.

@seven-phases-max
Copy link
Member

Closing as duplicate of #1952.

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