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

Re: pseudoclass based on document content

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Fri, 16 Jul 2004 15:32:59 -0700
Message-ID: <004001c46b84$d9a179f0$eb01000a@AFedoniouk>
To: "Justin Watt" <jwatt@email.unc.edu>
Cc: <www-style@w3.org>

Hi, Justin,

> 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>

I still don't understand what is the "conflict" here?

If you want to have two classes be assigned:

<td class="financial positive" >123</td>
<td class="financial negative" >-123</td>
....

Did I miss something?


Andrew Fedoniouk.
http://terrainformatica.com


From: "Justin Watt" <jwatt@email.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.
>
> --justin
>
>
> 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:33:39 GMT

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