Re: pseudoclass based on document content

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 UTC