- From: <bugzilla@jessica.w3.org>
- Date: Fri, 07 Dec 2012 16:54:21 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684 --- Comment #12 from Tab Atkins Jr. <jackalmage@gmail.com> --- (In reply to comment #11) > (In reply to comment #10) > > Relevant discussion here: > > http://lists.w3.org/Archives/Public/www-style/2012Nov/0428.html > > Tab, fantasai, can you guys summarize results of your discussion on this > thread? Would be nice to have something to hang a hat on :) Copy/paste from the internal email discussing this: Okay, first, rationalization. fantasai pointed out a legitimate criticism with the use of the /select/ combinator. Currently, evaluating a selector left-to-right or right-to-left are both stable - they change in continuous (for a reasonable definition of "continuous" as applied to discrete mutations of the element set) ways. In particular, if you start with a selector like "A", then add more to the left of it, like "B A", the latter's result is guaranteed to contain only elements matched in the former's result - that is, adding to the left purely *filters* the result, never changes it. Our use of /select/ changes this. Going from "A" to "B /select/ A" fundamentally changes the set of matched elements; in fact, due to our definition, you're guaranteed that *none* of the elements match between the two sets. This is weird. Currently, the only thing we have remotely like this is pseudo-elements: a selector like "*" matches all elements *except for* the pseudo-elements in the tree, which you have to specifically address with "*::before" or the like. So, we can build on this. Given the existing plans for a ::shadow() pseudoelement to let a light-dom stylesheet target explicitly-surfaced shadow-dom elements, we can create a parallel ::light() pseudoelement that does the reverse. ::light() pseudoelements only exist on <content> elements (and <shadow>? I forget), and take a selector, which is applied against the set of elements redistributed by the content element. Note that this selector is applied like normal for selectors, not just against children, so that something like "content::light(:link)" will grab *all* the links in the redistributed nodes, even if they're not children. To target just children, use a scoped selector or a relative selector, like "content::light(> :link)". This preserves some of the implicit invariants of CSS selectors, without removing any power - it's just a bikeshed of the /select/ syntax. -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Friday, 7 December 2012 16:54:25 UTC