+
Skip to content

Child combinator (>) in :has sometimes vanishes when transpiling nested css #3877

@malte-laukoetter

Description

@malte-laukoetter

When transpiling the following css using --supported:nesting=false the child combinator within the :has vanishes

.a :has(> .c) {
  .b & {
    background-color: green;
  }
}

result:

.b :is(.a :has(.c)) {
  background-color: green;
}

expected result:

.b :is(.a :has(>.c)) {
  background-color: green;
}

esbuild playground: https://esbuild.github.io/try/#YgAwLjIzLjAALS1zdXBwb3J0ZWQ6bmVzdGluZz1mYWxzZQBlAGVudHJ5LmNzcwAuYSA6aGFzKD4gLmMpIHsKICAuYiAmIHsKICAgIGJhY2tncm91bmQtY29sb3I6IGdyZWVuOwogIH0KfQ

see also: vuejs/core#11613

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载