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

Re: pseudo-class suggestion

From: Steven Pemberton <Steven.Pemberton@cwi.nl>
Date: Fri, 13 Mar 1998 17:08:36 +0100 (MET)
To: Chris Lilley <chris@w3.org>
Cc: roconnor@uwaterloo.ca, www-style@w3.org
Message-ID: <13577.22807.574288.94572@schoener.cwi.nl>
 > > Actually, a pseudo-class is a bit heavy-weight for this, since you
 > > could almost do it with some matching notation:
 > > 
 > >         *[ID=<whatever>] { background-color: green }
 > > 
 > > Steven Pemberton
 > 
 > I don't follow. 
 > 
 > Given this document foo.html:
 > 
 > <!doctype HTML system html4.dtd>
 > <title>foo</title>
 > <h1 id="a123">some text</h1>
 > <div id="b234"><p>more text</div>
 > <a name="c345"><p>and yet more</a>
 > 
 > How would I write a stylesheet to do the right thing each time when the
 > document is referenced on three separate occasions as:
 > 
 > foo.html#a123
 > foo.html#b234
 > foo.html#c345

<STYLE>
*[ID=theThingSelectedByTheCurrentURL()] {background-color: green}
</STYLE>

Or maybe you'd prefer a special operator:

*[ID#=CurrentURL()] {background-color: green}

Steven
Received on Friday, 13 March 1998 11:09:33 GMT

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