Re: CSS3 selectors: greater / less than

On Tue, 16 Jan 2007 20:42:45 +0100, Alastair Campbell <>  
> I was wondering how I could use <ins> and <del> elements to show
> different versions of a document, and thought that it would be useful
> to have 'greater than' and 'less than' CSS selectors. Either
> specifically for the datetime attribute, or perhaps for any numerical
> value.
> For example, to highlight (or hide) all the insertions from a
> particular point, you could target added comments like this:
> <ins datetime="2007-01-16T19:21:49+00:00">Inserted comment</ins>
> With:
> ins[datetime>="2007-01-15"] {background-color: #ff0;}
> I'm sure this must come up for developing specs in HTML quite often,
> but I couldn't see anything in the archive?

I believe this type of functionality is being considered for Selectors 2.  
Not sure about the syntax though or actual proposals.

Anne van Kesteren

Received on Tuesday, 16 January 2007 20:07:50 UTC