- From: <bugzilla@jessica.w3.org>
- Date: Wed, 24 Oct 2012 04:31:10 +0000
- To: public-webapps-bugzilla@w3.org
- Message-ID: <bug-19684-2532-Uq2SdUKkEa@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684 --- Comment #2 from Takashi Sakamoto <tasak@google.com> --- (In reply to comment #1) > (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. Would you mean whether reference combinator works or not depends on whether the attribute is valid or not? I looked at the reference combinator's spec and couldn't found that attribute selector only works for valid attribute or something. I could find the following: "attribute selectors must be considered to match an element if that element has an attribute that matches the attribute represented by the attribute selector." > > 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. If shadow reference combinator doesn't cross any treescope boundaries, I agree with you that this is not a problem. However, the current spec says that sometimes reference combinator can cross treescope boundary. I feel that it might be inconsistent. > 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 04:31:11 UTC