parcel-bundler / parcel-bundler/lightningcss
Unexpected Token Error with "all" property
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
The CLI tool returns an error when parsing the all property assigned the value of a CSS variable:
thread 'main' panicked at src/main.rs:180:46:
called `Result::unwrap()` on an `Err` value: Error { kind: ParserError(UnexpectedToken(Function("var"))), loc: Some(ErrorLocation { filename: "src/partials/_all.css", line: 1, column: 7 }) }
The _all.css file includes this content:
[style*="--all"] {
all: var(--all);
}
The error happens for all types of CSS selectors and all values for the variable name. The only way to stop the error is to change the variable name referenced inside the var() function.
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 panic with src/partials/_all.css, then inspect the failure at src/main.rs:180:46 and trace how the CSS parser handles the all property and var() function. Done means the CLI parses this input without panicking and retains the all: var(--all) declaration.
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
- 35/100