Extension of reference imported selector produces inconsistent output
Open
Nobody has claimed this yet.
bug
low priority
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
Files:
test.less
@import (reference) 'test-referenced.less';
@import 'test-extensions.less';
test-referenced.less
.font-base {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
letter-spacing: .05em;
}
.clearfix {
&:before,
&:after {
content: " ";
display: table;
}
}
test-extensions.less
.font-extension {
&:extend(.font-base all);
}
.a-clearfixed-thing {
&:extend(.clearfix all);
}
Command
lessc test.less
v2.7.1 & Expected Output
.font-extension {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
letter-spacing: .05em;
}
.a-clearfixed-thing:before,
.a-clearfixed-thing:after {
content: " ";
display: table;
}
v3.0.4 Output
.font-extension {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;letter-spacing: .05em;
}
.a-clearfixed-thing:before,
.a-clearfixed-thing:after {
content: " ";display: table;
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided test.less, test-referenced.less, and test-extensions.less inputs with lessc and compare the v3.0.4 output with the expected v2.7.1 formatting. Trace the reference import and extension output path, then verify that declarations are separated consistently in the generated CSS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100