Skip to content

Minifying Css nesting :where(& > .bar) generates invalid CSS #4005

@sapphi-red

Description

@sapphi-red

For the following input,

.foo {
  :where(& > .bar) {
    color: red;
  }
}

esbuild outputs

.foo{:where(>.bar){color:red}}

(esbuild try).

But this output is invalid because :where does not allow relative selectors.

Original issue: vitejs/vite#18974

reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions