W3C home > Mailing lists > Public > www-style@w3.org > January 2010

Re: [css3-selectors] Grouping

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 8 Jan 2010 12:15:18 -0600
Message-ID: <dd0fbad1001081015i761dda83pac50483108880286@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Nikita Popov <privat@ni-po.com>, news <news@terrainformatica.com>, www-style list <www-style@w3.org>
On Fri, Jan 8, 2010 at 12:05 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> I really like the idea in general, but I'm not sure about it being a pseudo-class. I'm not against that at this point, mind you, but it is not obvious to me if the following two rules are equivalent:
> div :any(span,div)
> div:any(span,div)
> or would that second version be nonsense, and simple selectors as arguments could only be used with a universal selector (or naked, implying a universal selector there).

Basic rules of CSS grammar say that they're not equivalent - putting
spaces between simple selectors like in the first example *always*
indicates the descendant combinator.  Authors should be able to pull
this lesson in from the entire rest of CSS, where there is a clear
difference between "input :checked" and "input:checked" (even if they
do make that sort of mistake, it's a very simple and consistent rule
to explain).

The second example isn't nonsense, the :any() just isn't adding
anything to the existing element selector.  The selector will only
match <div>s.

Received on Friday, 8 January 2010 18:15:51 UTC

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