W3C home > Mailing lists > Public > www-style@w3.org > March 2013

Re: [selectors] Matching of :first-child and the like for elements whose parent is not an element

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 19 Mar 2013 16:59:59 -0400
Message-ID: <5148D1CF.7010902@mit.edu>
To: www-style@w3.org
On 3/19/13 4:30 PM, Daniel Glazman wrote:
> Boris, do you want to take an action item to summarize the various
> possibilities (on both Selectors and Selectors API sides if needed)
> here so the WG can make a decision?

As I see it, there are four main options:

1)  Change nothing.
2)  Change the various structural pseudo-classes that match kids to
     match kids of any node.
3)  Change the kid-matching pseudo-classes to match kids of elements
     or documents.
4)  Change the kid-matching pseudo-classes to match kids of elements
     or DocumentFragments.

 From the point of view of styling, option 1 and option 4 are identical, 
and option 2 and 3 are identical, but 1 and 2 are distinct.

 From the point of view of selectors API all of the options are 
distinct, but there are use cases for #2 or #4.

In terms of implementation, I believe Gecko implements #4 (somewhat by 
accident), WebKit and Presto implement #1, and I haven't tested Trident 
recently.

Is that about what you were looking for?

-Boris
Received on Tuesday, 19 March 2013 21:00:32 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:25 UTC