Re: [csswg-drafts] [selectors] Pseudo class to indicated when a slot has content (#6867)

In the case of [Shoelace](https://shoelace.style/), we're using [imperative DOM code](https://github.com/shoelace-style/shoelace/blob/854db13bd7fbfad65f01de0838fe1a6b2dbf0a4d/src/internal/slot.ts#L3-L62) to do slot detection which, as @justinfagnani mentioned, doesn't work on the server. We can _probably_ work around some of these checks by changing structure/display so empty slots collapse, but this is very uncomfortable and won't solve all of our use cases.

As it stands, without such a selector, we can't get SSR fully functional. This has, unfortunately, been a pretty big hurdle for adopters who want to use our custom elements with metaframeworks + SSR.

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


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

Received on Wednesday, 21 June 2023 13:18:00 UTC