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

Hey, I haven't read all the issues that have ever been discussed here, it would be nice if we could discuss this at the f2f if there is a list of contentious things on which feedback would be welcome, but I however gave the spec another look. And wow at a personal level I'm super excited about this spec! 

I furthermore don't see any reason why Microsoft wouldn't support this spec moving forward as a prototype implementation in Blink. We can always learn from implementation experience and feedback, but this seems like a solid start.

That being said, I do have some minor feedback. The spec mentions `part="confirm-button, * => confirm-*"` as something that exits, but the syntax of `part` doesn't seem to allow this. Should this be added there? 

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.

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).

Finally, -- still a possible v2 addition, -- I wouldn't mind if we were able to add 'states' to parts. Something like `button[secondary disabled]` whose `secondary` and `disabled` states would be able to be targeted as `::part(button[disabled])` as a single class, and would naturally follow the `button` along with its eventual remapping like `::part(confim-button[disabled])`.

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

Received on Friday, 28 September 2018 21:23:38 UTC