Complex DR definition works as at-rule
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
A variable definition with a value that ends with an unnamed ruleset, e.g.
@var: x {y: z};
is interpreted as an unknown at-rule, thus resulting in:
@var : x {
y: z;
}
This is most likely a result of #2783. (Before #2783, such code resulted in a error, i.e. it's not a regression but more like an overlooked side-effect).
See also related https://github.com/less/less.js/issues/2270#issuecomment-61634539.
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 @var: x {y: z}; case and review the parsing change from #2783, along with the related discussion in #2270. Trace how variable definitions ending in unnamed rulesets are classified, then add regression coverage showing that the input is handled as a variable definition rather than emitted as an unknown at-rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100