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
Received on Monday, 21 April 2003 07:26:04 UTC

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