W3C home > Mailing lists > Public > www-style@w3.org > July 2004

Re: pseudoclass based on document content

From: Justin Watt <jwatt@email.unc.edu>
Date: Fri, 16 Jul 2004 18:09:37 -0400 (EDT)
To: Andrew Fedoniouk <news@terrainformatica.com>
Cc: www-style@w3.org
Message-ID: <Pine.A41.4.44+UNC.0407161756030.39586-100000@login8.isis.unc.edu>

That would work...

...unless you're already specifying a uniform style for the TDs:

<td class="financial">123</td>
<td class="financial">-123</td>
<td class="financial">(none)</td>

Assuming the numbers and table are being generated by code, I'd
could avoid the CLASS conflict this way:

<td class="financial" STYLE="color:black;">123</td>
<td class="financial" STYLE="color:red;">-123</td>
<td class="financial" STYLE="color:black;">(none)</td>

But then we've just totally blown a hole through the wall separating
content/programming and style.


On Fri, 16 Jul 2004, Andrew Fedoniouk wrote:

> > The benefit of this approach being that if negative numbers in your
> > document are surrounded by parentheses, you can modify the regular
> > expression in the stylesheet rather than having to modify your document to
> > play nice with a UA's implementation of ":negative-number".
> If you already have some code producing numbers in cells then why you cannot
> change it to produce:
> <td class="positive">123</td>
> <td class="negative">-123</td>
> <td class="undefined">(none)</td>
> etc. ?
> Just to keep it simple...
> Andrew Fedoniouk.
> http://terrainformatica.com
Received on Friday, 16 July 2004 18:10:31 UTC

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