W3C home > Mailing lists > Public > www-style@w3.org > January 2007

CSS3 selectors: greater / less than

From: Alastair Campbell <ac@alastc.com>
Date: Tue, 16 Jan 2007 19:42:45 +0000
Message-ID: <e4e1f3bd0701161142t3db88563o20ada19dcbf6a10d@mail.gmail.com>
To: www-style@w3.org

Hi everyone,

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

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>

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 realise you could get similar effects dynamically with DOM
scripting, but a CSS selector would allow useful highlighting and
hiding for simple cases, and perhaps people might start using them

Making it a generic selector (e.g. div[class>="10"] ) might be useful
for some things, but I haven't really thought that through. Not very
useful for IDs though, given their restrictions.

Just a thought,

Received on Tuesday, 16 January 2007 19:42:53 GMT

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