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

Re: [css3-selectors] :parent selector

From: L. David Baron <dbaron@dbaron.org>
Date: Sun, 1 Oct 2006 14:19:16 -0700
To: www-style@w3.org
Message-ID: <20061001211916.GA7685@ridley.dbaron.org>
On Sunday 2006-10-01 21:53 +0200, Jo-W wrote:
> I propose a "applies-to" selector:
> writing:
>  div |p| span { ... }
> would apply the css code on the <p> element instead of the <span> element.
> This should not have the same inefficiency (and less confusion when a
> human reads the selector).

It does have the same ineffeciency.  The inefficiency is in the concept,
not the syntax.

It is, however, easier to understand.  And, not surprisingly, it's
already been proposed before.  The two main reasonably-well-designed
proposals for ancestor selectors are the proposals for :subject (which
your proposal is similar to, and which was in early drafts of
css3-selectors[1]) and the proposal for :matches() [2].

A comparison of the two is available at [3].


[1] http://www.w3.org/TR/2000/WD-css3-selectors-20001005/#subject-pseudo
[2] http://lists.w3.org/Archives/Public/www-style/2003Apr/0146
[3] http://lists.w3.org/Archives/Public/www-style/2002May/0018

L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Sunday, 1 October 2006 21:19:28 UTC

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