- From: Bronislav Klučka <Bronislav.Klucka@bauglir.com>
- Date: Fri, 05 Jul 2013 19:48:11 +0200
- To: Steve Orvell <sorvell@google.com>
- CC: public-webapps <public-webapps@w3.org>
On 3.7.2013 5:36, Steve Orvell wrote:
>
>
> 3/ ability to create complex selectors using ::part
>
> This concerns me. I will stipulate that you have shown this is useful
> and that this type of styling is not otherwise as easily achievable.
>
> The problem I see is that we've now exposed the structure of a
> shadowRoot as part of its 'public' styling api. If ::part(foo) >
> ::part(bar) is an important state, I'm then not allowed to move part
> bar with respect to part foo. This 'implementation detail' of its
> ShadowDOM is now set in stone.
>
> Perhaps we could achieve similar expressiveness without the inherent
> brittleness by adding the ability to specify parts that map to a
> complex selector specified within the shadowRoot.
>
> From JavaScript, this might be something like:
> shadowRootHost.addPart('foobar', '::part(foo) > ::part(bar)');
As tab mentioned
in shadow, following parts
<div part='parent'>
<div>
<div part='child'></div>
</div>
</div>
should be in direct descendant - ancestor relationship, regardless of what is in between (there just can be no other part), I guess this is reasonable exposition, from Delphi / Visual Studio controls experience, in more complex complex controls one simply has to understand the relationship of publicly visible parts of control (if I would want to set an icon on the second tab of PageControl, I simply have to know, where i can find this tab {CustomerInfo.Tabs[1].Icon})
But I like your idea, much more generic and looking at it, since this is Shadow internal issue, I would go as far as
shadowRootHost.addPart('article-time', 'article header time');
which would mean that all time elements in header elements in article within this shadow root would be reachable by ::part(article-time), and in next release one could change it to
shadowRootHost.addPart('article-time', 'article header time,article footer time');
and ::part(article-time) would target both
I like that, because it hides the internals and makes changes easier
B.
>
>
>
> On Tue, Jul 2, 2013 at 6:32 AM, Bronislav Klučka
> <Bronislav.Klucka@bauglir.com <mailto:Bronislav.Klucka@bauglir.com>>
> wrote:
>
> Hi,
>
> since new paradigm conserning Custom Pseudo Elements have been
> introduced
> http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0985.html
> (part 5)
>
> I'd like to suggest few additions/changes:
>
> 1/ ability to style nested shadow dom elements
> 2/ change of part attribute from DOMString to DOMTokenList
> 3/ ability to create complex selectors using ::part
>
> the description/reasoning for this can be found here:
> http://projects.webnt.eu/spec/shadow/index.php
>
> In case ::part will not be in spec, the same still applies to pseudos
>
> Bronislav Klucka
>
>
>
>
Received on Friday, 5 July 2013 17:48:37 UTC