parcel-bundler / parcel-bundler/lightningcss

Ligthning generate :is with pseudo element

Open
#352 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi,

Considering the following code:

.foo {
  &::before {
    .bar & {
      color: blue;
    }
  }
}

ParcelCSS will generate the following CSS:

.bar :is(.foo:before){color:#00f}

Playground URL

However, using a pseudo element selector is not valid inside :is, so it should generate this instead:

.bar .foo:before{color:#00f}

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

Run the provided Playground reproducer first and inspect the CSS nesting and selector transformation path responsible for generating :is(). Compare the output for the nested pseudo-element case with the issue's expected CSS; done means pseudo-elements are not placed inside :is() and the output matches the reported form.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, rust
Domain
compilers, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.