W3C home > Mailing lists > Public > www-style@w3.org > March 2004

Proposal: Antecedant Selector - Styling Outside The Box

From: Wilton Pyle <dialate@bellsouth.net>
Date: Fri, 19 Mar 2004 07:22:34 -0500
To: <www-style@w3.org>
Message-ID: <NHBBJKMGGLIFFNMPCHONEEKJCJAA.dialate@bellsouth.net>

I have been trying to redesign my website with pure css (no javascript),
because for whatever reason I get a large number of visitors with javascript
disabled. I've come to the conclusion that I can't do it well without an
antecedant selector.

For example, suppose we have the following document model:

BODY< DIV< largeFontButton
           smallFontButton
      DIV< pageContent

A nice thing to be able to do would be:

largeFontButton:active - - DIV H1 { font-size-adjust: 2 }
largeFontButton:active - - DIV P { font-size-adjust: 2 }
...

so upon the user clicking largeFontButton element, the hypothetical "-"
antecedant selector would reference the parent, grab the tags, and style
them directly, without any nasty link tags and/or javascript.

Other uses include pure css multi-level animated-flyout menus (schwing!).
Received on Friday, 19 March 2004 07:26:20 GMT

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