parcel-bundler / parcel-bundler/lightningcss
`u + a` selector is minified to `u+a`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
u + a {
color: green;
}
becomes :
u+a{color:green}
I expected lightningcss to avoid forming <urange> tokens.
https://www.w3.org/TR/2021/CRD-css-syntax-3-20211224/#urange-syntax
There are likely more error cases.
Link text is #ff0000 because u+a is not a valid selector.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
u + a{color:red}
u+a{color:green}
</style>
</head>
<body>
<u>Underlined</u>
<a href="#">A link</a>
</body>
</html>
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 with the supplied u + a stylesheet and compare the minified output with the linked CSS Syntax urange rules. Trace the selector minification path in lightningcss, then verify that this case remains a valid selector and add coverage for the reported regression and any related token-boundary cases identified during investigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100