Line comments aren't stripped from @supports selector(...)
Open
Nobody has claimed this yet.
bug
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
Is this a bug or is this an expected behavior?
Demo (Less 3.11.3): https://jsbin.com/hewizek/6/edit?html,js,console
Input:
@supports selector(
:focus-visible // *"a"
) {
a {
color: red;
}
}
Output:
@supports selector(
:focus-visible // *"a") {
a {
color: red;
}
}
Expected:
@supports selector(:focus-visible) {
a {
color: red;
}
}
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 issue from the linked JS Bin using Less 3.11.3, then trace the @supports selector(...) parsing entry point for how line comments are handled. Done means the comment is removed from the generated @supports selector while the surrounding rule remains unchanged; add or run the relevant parser regression test if one is found.
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
- Mostly clear
- Newbie friendliness
- 45/100