[thelist] No Color on Visited Links

Randy Pearson randyp at cycla.com
Sun Oct 19 17:36:32 CDT 2003


>> It looks like you're going to have to use a 
>> workaround. I'm curious as to which solution you are going to implement.

>> -Samantha

In this case, we have a parser that is analyzing text and "colorizing"
(sorry) it using RegEx and language metadata to make its decisions.
Fortunately the parser is somewhat under our control, so although we didn't
intend to change its behavior, we can. 

What I think we'll do is, rather than wrapping text with, for example, <span
style="color: green;">, we will allow the parser to create CSS classes and
then maybe insert a <style> block before the rendered text. (We may even
revise the framework to allow the parser to interact with the <head>
section, or employ some other CSS management approach.) In any case, having
the parser use semantically-descriptive class names instead of colors makes
a lot of sense for other reasons. So now, if it wraps text with <span
class="codeComment">, we'll just bloat the rules a bit like this:

  .codeComment, .codeComment a:visited{ color: green; }

or something like that. Solves the problem at hand, and it's good to at
least know that MSIE has a bug and that maybe long-term the inheritance
could be viable.

-- Randy



More information about the thelist mailing list