Re: [csswg-drafts] [css-shadow-parts] ::part(foo)::part(bar) instead of forwarding? (#3841)

I think the main objection t this is that it would expose the implementation details in the API. E.g. if you expose something as ::part(a)::part(b)::part(c) then you must continue to maintain a custom element *b* wrapping *c* forever (or make a breaking API change).

It also prevents a component from hiding its inner parts from styling (unless we add some kind of `do-not-expose-parts="..."`. Preventing users from styling certain things is less of a concern but preventing users from depending on the existence of certain implementation details is a real goal.

In both cases, this is about who has control. I can see that this gives a bit of an escape hatch when the component author hasn't exposed enough but it's a step back toward the deep combinator.

It would be useful to know how you have been using part and what pain-point inspired this suggestion. Part hasn't had much attention since shipping, so knowing more about the practical problems with using it could help get it some attention.

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

Received on Thursday, 18 April 2019 22:35:16 UTC