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

RFE: CSS3 Selectors: Parent combinators

From: Chris Hubick <chris@hubick.com>
Date: 24 Jan 2003 17:14:23 -0700
To: W3C Style <www-style@w3.org>
Message-Id: <1043453663.24598.99.camel@CHWorkstation.CHD.hubick.com>

Request For Enhancement - CSS3 Selectors - Parent combinators.

A parent combinator describes a parenthood relationship between two
elements. A parent combinator is made of the "less-than sign" (<)
character and separates two sequences of simple selectors.


The following selector represents a <section> element that is parent of
an <h> element:

h < section

This would allow you to do something like the following:

h < section {
  padding-top: 0;

That rule would eliminate the padding at the top of any <section>
containing an <h> element, such as the first <section> in the following
document fragment:

    <h>My Example Heading</h>
    <p>Example paragraph text.</p>
    <p>Example paragraph text.</p>
    <p>Example paragraph text.</p>
    <p>Example paragraph text.</p>

On a related note, an "Ascendant combinator" ('/' ?) might be a nice
touch too.  Though, unlike Parent, I personally haven't bumped into the
want for one yet.

Chris Hubick
Received on Friday, 24 January 2003 19:14:24 UTC

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