- From: Westbrook Johnson via GitHub <sysbot+gh@w3.org>
- Date: Mon, 06 Feb 2023 15:40:46 +0000
- To: public-css-archive@w3.org
Great nuance in: > ``` > <slot> > <p>Lorem ipsum dolor...</p> > </slot> > ``` That `p` comes back in `.assignedElements({flatten: true})` but not `.assignedElements()` and is _NOT_ available in `::slotted(p)` but is in `:host p`, which vaguely implies that we'd need two selectors or rather one with some settings (!? 😳, not sure if there are examples of that beyond [attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors#attr_operator_value_i)) to ensure we have full control over the content we're shipping here. I'm not quite sure how you could combine `:has-slotted` and `:empty` to get the sort of outcomes desired here, specifically in that `:empty` is an element state selector and `:has-slotted` is a child state selector, they don't apply to the same elements in my imagination. Could you share more on that? I could maybe see `:not(:has-slotted(...))` getting you somewhere (assuming the `p` wasn't queried by this selector), but then how would you capture that the `p` is there, unless we can also have `:host:has` (point of order: not in the function reference, but directly on the element) that pointed into the shadow root...interesting. -- GitHub Notification of comment by Westbrook Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6867#issuecomment-1419290424 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 6 February 2023 15:40:48 UTC