-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Bug: extend compiled incorrectly (leaks through nested &
)
#2586
Comments
Confirmed. Workaround: you don't need .bordered {
border: solid 1px black;
}
.somepage {
.content:extend(.bordered) {
> span {
margin-bottom: 10px;
}
}
} instead. Alternatively use nested .bordered {
border: solid 1px black;
}
.somepage {
.content {
&:extend(.bordered);
& > span {
margin-bottom: 10px;
}
}
} |
(selfnote) It looks like |
&
)
I think you're right. The extend should "target" the preceding selector to be added to the declaration(s) for |
But this clearly a bug. All three snippets in my answer should produce the same result just by definition.
and
should produce equal CSS regardless of |
Fixed by #2759 |
The following LESS source is compiled incorrectly:
Produced CSS file:
border rule for .somepage .content > span is incorrect.
The simpler following source will be compiled correctly:
The text was updated successfully, but these errors were encountered: