W3C home > Mailing lists > Public > www-style@w3.org > March 2015

Re: CSS pseudo-selector :closest and :further

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 20 Mar 2015 11:15:07 -0700
Message-ID: <CAAWBYDB+czZD1tPzVRCKgch9s=6-XigErz0HBbJQcuPfiVTT6g@mail.gmail.com>
To: David Rodrigues <david.proweb@gmail.com>
Cc: Brian Kardell <bkardell@gmail.com>, "www-style@w3.org" <www-style@w3.org>
On Wed, Mar 18, 2015 at 10:55 AM, David Rodrigues
<david.proweb@gmail.com> wrote:
> It'll allow you match the closest element from base selector.

That's a violation of Selectors data model; pseudo-classes are
basically browser-set classes based on data from the DOM tree; they
can't respond to the surrounding selector itself.

The idea is valid, but the syntax needs to be roughly what Benjamin
outlines - this is a combinator, as it's transforming the set of
selected elements.  It's just doing so *with the help of* another
selector.

~TJ
Received on Friday, 20 March 2015 18:15:54 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC