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:

<HTML>
  <HEAD>
    ...stuff
  </HEAD>
  <BODY CLASS="letter">
    <ADDRESS CLASS="from">
      Me
      My house
      My town
    </ADDRESS>
    <ADDRESS CLASS="to">
      Him
      His house
      His town
    </ADDRESS>
    Texttexttexttext
  </BODY>
</HTML>

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
present.

Now, what do you think about this?

CU
   Simon
Received on Thursday, 4 June 1998 17:08:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:55 GMT