Re: [csswg-drafts] [css-scoping-1] Clarify exactly what :host(<sel>) can use as argument (#7953)

For consistency, if restrictions are lifted on :host(), restrictions should also be lifted for ::slotted()?

There is some bug with :has() in ::slotted() in Safari (lime bg on the span without an &lt;i&gt; as well):

```html
<!doctype html>
<main>
  <div id="host"><span>Green<span> <span>Green on lime<i></i></span></div>
</main>
<script>
  let root = host.attachShadow({mode:"open"});
  root.innerHTML = `
    <slot></slot>
    <style>
      :host(:is(main > #host)) { background-color: blue; }
      :host(:has(i)) { border: 10px solid orange; }
      ::slotted(span:has(i)) { background-color: lime; }
      ::slotted(:is(#host > span)) { color: green; }
    </style>
  `;
</script>
```


-- 
GitHub Notification of comment by lilles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7953#issuecomment-1291200482 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 25 October 2022 22:16:23 UTC