Re: [csswg-drafts] [css-shadow-parts] decide on forwarding micro-syntax for partmap

By migrating, I mean, I defined a custom element with a part name interface (I think of part names as the styling interface for a CE) and then I realize later that my interface is bad and I would like to migrate to a better one but I don't want to force all my users to migrate immediately. Alternatively, I would like to support 2 interfaces, maybe to ease dropping my CE in as a replacement for some other CE. So I present inner parts under multiple names.

That said, I think that's a valid but minority use case, I expect forwarding both b and c as a would be more common.

To be clear, I'm not confused by the arrow, I just find the order confusing. I expect the first thing to the thing which is being created/defined (a part name that will be visible to the outside) and the second to be the definition. I think I would prefer that regardless of whether it's "a=>b", "a=b" or just "a b". Then, the partmap attribute just looks a lot like a serialized dictionary and maybe "a: b, ..." and "a : b c, ..." would actually be most natural since it's almost JSON.

So 3 things
1 Decide on "a b", "a=>b", "a: b" and I don't have a strong opinion on that although I think I would prefer to have something beyond whitespace and comma in there.
2 Unless I'm missing an argument for "b=>a", I'd propose making it "a=>b" to add «[ a → partMap[b] ]» to the part map.
3 Allow "a => b c" to add «[ a → partMap[b] ]» and «[ a → partMap[c] ]» to the part map.



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

Received on Monday, 26 March 2018 08:43:28 UTC