Re: [csswg-drafts] [css-shadow-parts] confirm browser support

I don't think anyone disagrees that there should be a map-like API eventually. A string-based API to start with does not preclude a map one coming later and renaming was done for exactly that reason. I don't see that this blocks moving forward unless you think we will regret adding the string-API in the future. I would prefer to go with no IDL attributes than block on designing DOMTokenMap.

In my mind, `exposedparts` is something that's set at element creation time and remains static. If you're updating it, you're probably doing something wrong. I haven't seen any examples that would require that except `*`-forwarding but that's an argument for implementing `*`-forwarding not for adding DOMTokenMap.

> It's unclear which name is getting mapped to which (is the first name one in the inner shadow or the second one?)
Right, you cannot tell just by looking at it, whether the inner or outer name part name comes first. However, we have documented which it is and people will soon remember. Are you suggesting it should be self-describing? The only way I can think of that makes it self-describing without making the value much more verbose and harder to parse is to rename the attribute. E.g. `innertooutertparts="foo bar, ..."` at which point it's probably clear that inner comes first. We could also try `exportpartas="foo as bar, ...". I'm not really a fan of either of them. Do you have a suggestion?

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

Received on Thursday, 27 September 2018 13:17:55 UTC