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: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 20 Mar 2013 09:03:20 -0700
Message-ID: <CAAWBYDDS=g0QZZLnU_fiHp_J35wktubrQ=hOxTHejXA8nhGgQg@mail.gmail.com>
To: Øyvind Stenhaug <oyvinds@opera.com>
Cc: Henrik Andersson <henke@henke37.cjb.net>, Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:07 GMT