Re: [csswg-drafts] [css-shadow-parts][css-scoping] Allow ::part after ::slotted (#3896)

So i ran in a particular scenario where you want to anchor something in the shadow DOM to a part in a slotted custom element:

```css
:host .anchored {
  position-anchor: --anchor;
}

::slotted(*)::part(anchor) {
  anchor-name: --anchor;
}
```

This is not valid CSS atm (due to this issue).

The workaround was that i had to insert the following into the *light DOM*:

```css
doc-nav-item:has(> doc-nav-item[active])::part(active) {
  position-anchor: --active;
}

doc-nav-item > doc-nav-item[active]::part(leaf) {
  anchor-name: --active;
}
```

Can we revisit this issue plz?

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


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

Received on Wednesday, 25 March 2026 09:17:27 UTC