Can't extend a nested class (concatenated selector)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
Heya guys.
I have found an annoying issue, which is pretty basic use of two mechanics:
I cant extend a class i generate by nesting it using "& {}"
Heres my example:
.box {
padding: @base-spacing;
&--large {
padding: @large-spacing;
}
}
.foo {
&:extend(.box--large);
}
Expected result:
.box {
padding: 24px;
}
.box--large,
.foo {
padding: 48px;
}
What actually happens:
.box {
padding: 24px;
}
.box--large {
padding: 48px;
}
Imo this is very basic use of two mechanics, and it's not like its generated by some kind of wizard looping mixin.
Looking forward to have this fixed :-)
Kind regards, Dennis
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
Reproduce the nested selector and extend example from the issue in the Less compiler, then compare the generated CSS with the expected output. Trace the selector-extension entry point that handles the concatenated .box--large selector. Done means the output includes .foo alongside .box--large for the nested class.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100