Scripsit Bob Cox:
I am getting the error:
Invalid number : color fuchsia is not a color value : fuchsia
from the W3C CSS validator, yet I am sure the same CSS validated ok
previously.
It's a bug in the "W3C CSS Validator's" definition of the "CSS 2.1 profile",
as you seem to have found out. What makes it nasty is that they made that
"profile" the default one.
Generally, the best forums for discussing the checking tools are the W3C
mailing lists for them. Regarding this specific bug, see
http://lists.w3.org/Archives/Public/...6Dec/0051.html
As I mention there, the way to circumvent the bug is, of course, to use #f0f
instead of the color name.
Naturally, you can ignore the error message when you have checked that it is
wrong. There is no problem with the color name fuchsia in _browsers_ (or in
specifications), just in the "W3C CSS Validator". You could also consider
using the CSS 2.0 profile.
a:active {
color: fuchsia;
text-decoration: underline;
background: inherit;
}
If I substitute, say, 'red' for 'fuchsia' then there is no error and
if I use rgb values it is also ok, but I somehow feel sure that this
used not to fail validation.
Am I doing something blindingly obviously wrong?
You are setting background: inherit, which 1) isn't supported by IE even in
IE 7 and 2) does not handle the risk of having background and content color
too similar - the color you inherit may well come from a user stylesheet.
Besides, you are setting text-decoration to inderline, which probably means
that you have removed underlining from links in their normal states.
Moreover, using fuchsia for active links is misleading, since fuchsia
resembles the typical color of visited links in non-active state.
These points have nothing to do with the bug under discussion, but you asked
whether you are "doing something blindingly obviously wrong". :-)
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/