Parallel extends do not inherit styles
Open
Nobody has claimed this yet.
bug
medium priority
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
TL;DR: .B is nested inside .A. If .A1 extends .A and .B1 extends .B, I would expect that .A1 .B1 {} would inherit the same styles as .A .B {}. However it does not.
/*-----------*\
less input:
\*-----------*/
.title {
.firstpara {
margin-top: 0;
}
}
.title-main {
&:extend(.title all);
}
.firstpara-main {
&:extend(.firstpara all);
}
/*----------------*\
returned result:
\*----------------*/
.title .firstpara,
.title-main .firstpara,
.title .firstpara-main {
margin-top: 0;
}
/*----------------*\
expected result:
\*----------------*/
.title .firstpara,
.title-main .firstpara,
.title .firstpara-main,
.title-main .firstpara-main {
margin-top: 0;
}
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 CodePen reproduction and compare the generated selectors with the expected output in the issue. Trace the handling of parallel nested extends, then verify that the combined .title-main .firstpara-main selector is generated without regressing the existing selectors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100