- From: <bugzilla@jessica.w3.org>
- Date: Wed, 24 Oct 2012 03:57:37 +0000
- To: public-webapps-bugzilla@w3.org
- Message-ID: <bug-19684-2532-bbQctX4UWu@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684
Dimitri Glazkov <dglazkov@chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jackalmage@gmail.com
--- Comment #1 from Dimitri Glazkov <dglazkov@chromium.org> ---
(In reply to comment #0)
> I think, /select/ is a little confusing for web developers. It would be
> better to use css function instead, e.g.
> - distributed-into(), or
> - selected-by()
>
> I will write the reason why I suggest css function.
> Current shadow dom spec says,
>
> - The combinator value must be select
> - The first compound selector of the combinator must match an insertion point
> - The second compound selector must match an element, distributed to this
> insertion point
>
> Its example is .some-insertion-point /select/ div.special.
>
> However, any element can have "select". For example, users can write '<div
> class="some-insertion-point" select="...">'.
>
> So it is difficult to know whether /select/ is just reference combinator or
> shadow reference combinator.
"select" is not a valid attribute for a "div". I don't see what is difficult.
>
> For example,
> <div class="shadow-host">
> <#shadow-root>
> <style>
> .some-insertion-point /select/ div.special { color: red; }
> </style>
> <div class=".some-insertion-point" select="#B">
> <content class=".some-insertion-point">
> <div id="B">This text is red?</div>
> </#shadow-root>
> <div class="special">This text should be red!</div>
> </div>
>
> The ".some-insertion-point /select/ div.special { color: red; }" should be
> applied to distributed node or just div in shadow dom subtree? Both?
>
> The most difficult thing is that we cannot decide whether
> ".some-insertion-point" points really insertion points or not when parsing
> the rule.
>
> So by using css function, we can write:
> - div.special:distributed-into('.some-insertion-point') { color: red; }, or
> - div.special:selected-by('.some-insertion-point') { color: red; }
>
> This is very easy to know that the style should be applied to distributed
> nodes.
>
> What do you think about this?
I think the example you brought up is rather weak. I honestly don't see a
problem with this. Thus, in my opinion, this is bike-shedding.
Also, you need to argue with Tab and the CSS WG about this. He is the one who
recommended to use reference combinator.
Also, here's more information on the reference combinator:
http://www.w3.org/TR/selectors4/#idref-combinators
--
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 24 October 2012 03:57:38 UTC