473,414 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

CSS validator error when using "fuchsia"

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/
Dec 26 '06 #1
5 2156
Bob Cox wrote:
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.
Dec 26 '06 #2
Bob Cox <ne**@bobcox.comwrote:
Invalid number : color fuchsia is not a color value : fuchsia
W3C CSS checker tool bug.

--
Spartanicus
Dec 26 '06 #3
In article <6q********************************@4ax.com>,
Spartanicus <in*****@invalid.invalidwrote:
Bob Cox <ne**@bobcox.comwrote:
> 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/
Dec 26 '06 #4
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/

Dec 26 '06 #5
In article <mf*****************@reader1.news.saunalahti.fi> ,
Jukka K. Korpela <jk******@cs.tut.fiwrote:
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". :-)
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/
Dec 26 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: johnsuth | last post by:
I want to produce a trivial demonstration of dynamic modification. I thought that pressing a button might change its color. I studied O'Reillys books and successfully created the button with a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.