Skip to content

Broken :has with modifier compilation #1937

Closed
@fabiospampinato

Description

@fabiospampinato

I'm on v1.62.0 (latest), and the following:

.foo {
  &:has(+ &) {
    display: none;
  }
}

Is being compiled to this:

.foo:has(.foo) {
  display: none;
}

While instead it should be compiled to this:

.foo:has(+ .foo) {
  display: none;
}

Basically the + inside the :has disappeared.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions