Extend within container query
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
Extend seems to fail to take into account it being used within a container query.
To reproduce:
.a {
color: red;
}
@container container-name {
.b {
&:extend(.a);
}
}
Current behavior:
Compiles down to this
.a,
.b {
color: red;
}
@container container-name {
}
Expected behavior:
.a {
color: red;
}
@container container-name {
.b {
color: red;
}
}
Environment information:
lessversion: 4.9.1
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 with the linked less-preview reproduction using the @container and &:extend(.a) example. Trace how the compiler handles extend across the container query and compare the result with the expected CSS; done means .b receives .a's declarations inside the @container block without producing an empty block.
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
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 64/100