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

ID selector via attribute?

From: Tom Gilder <tom@tom.me.uk>
Date: Mon, 21 Apr 2003 12:25:54 +0100
Message-ID: <1844861375.20030421122554@tom.me.uk>
To: www-style@w3.org

Is there a reason why there couldn't be a way to select elmemets by
IDs, based on an attribute of another element?

For instance, something like (this syntax isn't too good though):

  <label for="me">text</label> <input .. id="me">

  label:focus #attr(for) { color: red; }

...would make the input red when label is focussed. Would be quite
handy imo.

If not that, then how about a specific selector just for form labels?

-- 
Tom Gilder
http://tom.me.uk/
Received on Monday, 21 April 2003 07:26:04 GMT

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