W3C home > Mailing lists > Public > www-style@w3.org > October 2006

Re: [css3-selectors] :parent selector

From: Richard York <richy@smilingsouls.net>
Date: Fri, 06 Oct 2006 13:37:14 -0400
To: Jan de Mooij <jdemooij@gmail.com>
CC: <www-style@w3.org>
Message-ID: <C14C0C8A.773C%richy@smilingsouls.net>
And why would it be confusing?  It isnıt complicated.  It wonıt prohibit you
from using all of the selectors that you already know.      Why not provide
ancestor selectors where technical requirements such as incremental
rendering arenıt a factor?  I donıt think any of the devs that have
commented on the topic would be opposed to parent selectors were it not for
incremental rendering.

Iım not going to join in on the ongoing debate about implementing parent
selectors in incrementally rendered CSS, I think plenty of bright people
have already beat that topic to death on this list several times.  Setting
that aside, I think the Selectors API would benefit from it.  Iıve written a
few scripts that use parent/ancestor syntax via Dean Edwardsıs cssQuery()
[1].  I asked Dean to write an ancestor/parent selector extension some time
back, he wrote one for me, and it turned out to be incredibly useful and
time saving.  cssQuery() itself is so useful, in fact, that I canıt imagine
having to write scripts without it.  I donıt think Dean ever got around to
releasing that extension, but I for one, think itıs a big help.  Ever so
often you have need of going up the node tree.  Yeah, itıs only a few lines
of code to do that, if that, but by the same token, it would only be a few
lines of code and a few lines in the CSS Selectors spec to make that a
capability of the Selectors API too.

When I first brought up the idea of an ancestor extension to Dean, he was
hesitant to write it because he wanted cssQuery to support only standard
CSS.  Which, is understandable, but CSS being applicable to more than one
type of document, and various programming languages, like this Selectors
API, we must concede that incremental rendering wonıt always be a
requirement, and at the very least set aside and define what syntax should
be used, should a parent or ancestor selector be supported and technically

[1] http://dean.edwards.name/my/cssQuery/

On 10/6/06 11:34 AM, "Jan de Mooij" <jdemooij@gmail.com> wrote:

> I don't think it's a good idea to create two versions of CSS selectors? The
> power of the Selectors API is imho that it has the same syntax as
> CSS-selectors, and isn't it confusing to have two slightly different versions
> of CSS-selectors?

Richard York
Web Application Developer
Received on Friday, 6 October 2006 17:37:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:26 UTC