parcel-bundler / parcel-bundler/lightningcss
Don't split unsupported selectors
Open
Nobody has claimed this yet.
pending triage
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
Version
1.25.1
input
.foo, .bar:baz {
color: green;
}
output
.foo {
color: green;
}
.bar:baz {
color: green;
}
Browsers ignore the entire rule when it encounters the unsupported selector .bar:baz, but Lightning CSS parses it and changes it so that .foo is in effect, which is incorrect.
expected
Prints the warning and then outputs the original CSS as is.
.foo, .bar:baz {
color: green;
}
Test in Browser
data:text/html;charset=UTF-8,<!doctype html>
<style>
.foo, .bar:baz {
color: green;
}
</style>
<div class="foo"> foo </div>
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
No source file or test is named in the issue. Reproduce the provided .foo, .bar:baz input and trace the selector parsing and splitting behavior; the fix is done when an unsupported selector keeps the whole rule intact, emits the warning, and a regression test covers the original CSS output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, rust
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100