Connecting Tech Pros Worldwide Forums | Help | Site Map

CSS validator error when using "fuchsia"

Bob Cox
Guest
 
Posts: n/a
#1: Dec 26 '06
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.

The offending CSS is:

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?

TIA

--
Bob Cox. Stoke Gifford, near Bristol, UK.
http://pippin.co.uk/

Harlan Messinger
Guest
 
Posts: n/a
#2: Dec 26 '06

re: CSS validator error when using "fuchsia"


Bob Cox wrote:
Quote:
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.
>
The offending CSS is:
>
a:active {
color: fuchsia;
text-decoration: underline;
background: inherit;
}
Is this a copy-and-paste from your CSS file? I'm just thinking you could
have easily mistyped "fuchsia" and it would be easy to overlook. Fuchsia
is definitely one of the defined color names.
Spartanicus
Guest
 
Posts: n/a
#3: Dec 26 '06

re: CSS validator error when using "fuchsia"


Bob Cox <news@bobcox.comwrote:
Quote:
Invalid number : color fuchsia is not a color value : fuchsia
W3C CSS checker tool bug.

--
Spartanicus
Bob Cox
Guest
 
Posts: n/a
#4: Dec 26 '06

re: CSS validator error when using "fuchsia"


In article <6qh2p2p6pb20oi0v20uc4j7rjkusdeibus@4ax.com>,
Spartanicus <invalid@invalid.invalidwrote:
Quote:
Bob Cox <news@bobcox.comwrote:
>
Quote:
> Invalid number : color fuchsia is not a color value : fuchsia
>
W3C CSS checker tool bug.
Thanks. I have now discovered that the CSS checker is defaulting to CSS
version 2.1 - there are no errors if this setting is changed to CSS
version 2 or to CSS version 3.

It only objects to "fuchsia" when checking as CSS version 2.1.

So I guess you are right ;-)

--
Bob Cox. Stoke Gifford, near Bristol, UK.
http://pippin.co.uk/
Jukka K. Korpela
Guest
 
Posts: n/a
#5: Dec 26 '06

re: CSS validator error when using "fuchsia"


Scripsit Bob Cox:
Quote:
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.
Quote:
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/

Bob Cox
Guest
 
Posts: n/a
#6: Dec 26 '06

re: CSS validator error when using "fuchsia"


In article <mfekh.9632$g_1.4247@reader1.news.saunalahti.fi> ,
Jukka K. Korpela <jkorpela@cs.tut.fiwrote:
Quote:
Scripsit Bob Cox:
>
Quote:
>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.
>
Quote:
>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". :-)
Thank you very much indeed for the comprehensive reply and also the
additional comments regarding "inherit". Food for thought, certainly,
and much appreciated.

--
Bob Cox. Stoke Gifford, near Bristol, UK.
http://pippin.co.uk/
Closed Thread


Similar HTML / CSS bytes