W3C home > Mailing lists > Public > www-style@w3.org > September 2009

Re: Supporting Scoped Selectors in Selectors API 2

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Mon, 28 Sep 2009 20:24:47 -0700
Message-ID: <4AC17DFF.90000@terrainformatica.com>
To: Brad Kemper <brad.kemper@gmail.com>
CC: Lachlan Hunt <lachlan.hunt@lachy.id.au>, www-style <www-style@w3.org>
Brad Kemper wrote:
> On Sep 28, 2009, at 9:35 AM, Andrew Fedoniouk wrote:
>> elm.querySelector(": div div, : div p");
>> elm.querySelector(": > em, :> strong, :+code");
>> Such construction definitely will not conflict with any future selectors.
> What makes you so sure? It seems to imply a pseudo-class, but not any 
> particular pseudo-class, and maybe in the future there will be a more 
> appropriate one to use with a naked colon at the beginning. Is there any 
> problem (other than length), with being more specific, such as:
>  elm.querySelector(":reference > em, :> strong, :reference +code");
>> More strong (grammatically) alternative is "::" - double colons.
> Also more confusing, as double colons are associated with 
> pseudo-elements, not pseudo-classes.

':' is used already in selectors that is why any its variation
is significantly less probable to create problems in future as we can 
inspect all cases now.

And yet: we are using Element.select() function couple of years and
so far the only cases I've seen are like this:

":scope > something"

I am pretty sure that it is pretty safe to reduce this construction to 
simply this:

"> something"

This will not require anything new at all.

Andrew Fedoniouk.

Received on Tuesday, 29 September 2009 03:25:09 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:39 UTC