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

> Also, I would tend to try to keep the part mapping syntax close to the desugaring syntax in javascript, so I'd voice a weak preference for part="keepAlike, oldName:newName" and by extension oldName-*:newName-*. I do see very valid use cases for exposedparts to perform prefixing operations for sub-components, I'd strongly suggest to keep this in v1.

Ooh, that's a pretty reasonable critique. While I do often find myself having to think for a moment to remember the correct ordering for destructuring, having CSS use a related syntax at least means that I'd only have to learn this once.

> Additionally, -- and I realize this doesn't have to be part of v1, -- something I would enjoy having along this would be something like :of-part(label) which could be use within a tree to match any element that is in that tree and whose closest ancestor with the part attribute defined has value label (similar to how :lang works today) maybe with :in-part(label) which would select if any ancestor has part=label (both of these would not cross shadow tree boundaries).

Already doable today by just giving the part multiple names. You can say `part="button, button-disabled"` for instance, then both `::part(button)` and `::part(button-disabled)` will work.

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

Received on Friday, 28 September 2018 21:43:42 UTC