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

On 3/20/13 9:16 AM, Øyvind Stenhaug wrote:
> Not just *, but in general the concept of a "document tree" in CSS is
> that of a tree of elements, which isn't exactly equivalent to the DOM.

Indeed.

> That's why I think it would be confusing to have :first-child etc match
> something that isn't a child in this sense.

Honestly, I think it's really confusing the way it's written right now, 
for the DocumentFragment case.

> (it's not clear to me what exactly the concrete
> use-cases for fragments would be).

Depending on what happens with shadow roots, a concrete use-case may 
well be "sane ability to querySelector your shadow DOM".

-Boris

Received on Wednesday, 20 March 2013 16:12:53 UTC