Re: [csswg-drafts] [css-shadow-parts][css-scoping] Is ::slotted() allowed after ::part()? (#10807)

Hm. So, ::slotted() is a shadowish variant of the child combinator; it selects children in the flat tree, more or less. Since we don't allow `::part() > .foo`, then, I'm inclined to say it's consistent to ban `::part()::slotted(.foo)` as well.

On the other hand, the shadow author has control over the subtree and can choose to expose the part's children as more parts if they want; they don't have control over the slotted elements. So I could see an argument that it's potentially useful to expose this. A similar argument can be made that "children of an element" are structural information that the component author can reasonably not want to expose (thus, we don't), but "elements slotted into this slot" are *morally* much closer to a property of the slot element, since the component author isn't in control of them.

I think that means I'm torn and can go either way on this issue.

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


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

Received on Monday, 23 September 2024 17:09:31 UTC