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

On Wed, Mar 20, 2013 at 6:16 AM, Øyvind Stenhaug <oyvinds@opera.com> wrote:
> That's why I think it would be confusing to have :first-child etc match
> something that isn't a child in this sense. Also, as has been pointed out
> already, the current definition has been around for a long time. So I tend
> to think that it should be kept, at the very least for the non-fragment case
> (it's not clear to me what exactly the concrete use-cases for fragments
> would be).

"Been around for a long time" is only relevant if we think people
would be confused, or think there are backwards-compat issues.  I
don't think either is true here.

On Wed, Mar 20, 2013 at 6:25 AM, Øyvind Stenhaug <oyvinds@opera.com> wrote:
> On Tue, 19 Mar 2013 21:27:52 +0100, Tab Atkins Jr. <jackalmage@gmail.com>
> wrote:
>> I don't see a meaningful distinction between a root node and a node
>> without a parent in a DocumentFragment.
>
> Maybe the latter should match :root, then? Then it would be possible to
> select for it explicitly (and do a union with :first-child or whatever), if
> desired.

Makes sense to me.

> See also
> http://lists.w3.org/Archives/Public/www-style/2007Jun/0116.html

Yay, a thread that directly addresses the current topic, but which no
one responded to!

~TJ

Received on Wednesday, 20 March 2013 16:04:10 UTC