W3C home > Mailing lists > Public > www-style@w3.org > June 1998

Selector "on presence of"

From: Simon Richter <geier@psi5.com>
Date: Thu, 04 Jun 1998 22:35:35 +0200
Message-ID: <35770517.68BBC9F6@psi5.com>
To: www-style@w3.org
Hi all...

Would it make sense to have a selector that makes the rules apply only
if a certain other element is present/not present?

A possible use:

  <BODY CLASS="letter">
    <ADDRESS CLASS="from">
      My house
      My town
    <ADDRESS CLASS="to">
      His house
      His town

This could be laid out as a letter, no problem (BTW: Is there a
:first-page pseudo-class?), but if the sender wanted to add something
like a company logo, the layout would need some corrections, which could
be made in a special rule which would only apply if a IMG.logo was

Now, what do you think about this?

Received on Thursday, 4 June 1998 17:08:20 UTC

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