parcel-bundler / parcel-bundler/lightningcss

Not able to parse when no value present

Open
#477 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pending triage
Dominant language
Rust
Stars
7.7k
Forks
302
PR merge metrics
No merged PRs in 30d

Description

Parsing fails for the code:

div {
    width: 100px;
    height: 100px;
    background: #dd6b4d;
    fhbj32brjb3;
}

Even though is valid style rule and renders correctly in browser. Browser simply chooses to ignore the invalid property. So ideally this should parse as:

div {
    width: 100px;
    height: 100px;
    background: #dd6b4d;
}

Playground link

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the example using the linked Lightning CSS playground, then trace the CSS parser path for a declaration containing only an identifier and no colon or value. Done means the invalid declaration is ignored while the valid declarations remain in the parsed output; add or run the relevant parser regression coverage if the repository provides it.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, rust
Domain
compilers, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.