Skip to content

CSS nesting && is lowered incorrectly #3997

@sapphi-red

Description

@sapphi-red

According to the spec, for the following input,

.foo {
  color: blue;
  && { padding: 2ch; }
}

the lower result should be

.foo { color: blue; }
.foo.foo { padding: 2ch; }

But esbuild outputs,

.foo {
  color: blue;
}
.foo {
  padding: 2ch;
}

which has a different specificity (esbuild try).

Original issue: vitejs/vite#18843

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions