lightningcss icon indicating copy to clipboard operation
lightningcss copied to clipboard

Nested `:has(+ &)` is rewritten incorrectly (even without minification)

Open benface opened this issue 3 months ago • 0 comments

This CSS:

.container .style-previous {
  :has(+ &) {
    background: red;
  }
}

is rewritten to:

:has( + .container .style-previous) {
  background: red;
}

which doesn't select the same elements.

benface avatar Oct 15 '25 17:10 benface