W3C home > Mailing lists > Public > www-validator-css@w3.org > December 2006

Re: Validator reports error for color fuchsia

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sun, 24 Dec 2006 10:32:23 +0200 (EET)
To: David Azarewicz <david@88watts.net>
cc: "www-validator-css@w3.org" <www-validator-css@w3.org>
Message-ID: <Pine.GSO.4.64.0612241011260.25358@mustatilhi.cs.tut.fi>

On Sat, 23 Dec 2006, David Azarewicz wrote:

> A:hover { color: fuchsia; background: transparent; }
> Generates the following error:
> A:hover  	Invalid number : color fuchsia is not a color value : fuchsia

This is a genuine bug in the "W3C CSS Validator", and it probably results 
from incidental omission of fuchsia from the list of recognized color 
names. I tested the other 15 color names and they are correctly accepted.

The way to circumvent the bug is, of course, to use #f0f (or, if you 
prefer, some equivalent numeric designation). It's a good idea anyway to 
use numeric color designators rather than names, since the 16 color names 
aren't very useful - most of those should rarely be used.

I tried some of the misspellings of "fuchsia" that I was able to imagine, 
based on the hypothesis that the color names has simply been mistyped in 
the list of recognized names. But there was no hit, so I guess the name is 
simply missing.

(I also tried orange, which also gets accepted, and the "W3C CSS 
Validator" claims that "This document validates as CSS!" with CSS as a 
link to the CSS 2 specification, thereby claiming that a style sheet that 
does not conform to the CSS 2 specification "validates" as CSS 2.)

The bug seems to have been introduced when CSS 2.1 support was added, 
since if you set (via "More Options") the "Profile" to CSS 1, the document 
"validates", though reported as "validating" as CSS 2. Ditto for CSS 2 and 
CSS 3.

So the reason you now get this false error message is that the default 
"profile" has been set to CSS 2.1, whatever that means.

(I think the misleading text "Invalid number" in error messages has been 
reported earlier several times, so I guess it's an unfixable bug. :-) )

Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
Received on Sunday, 24 December 2006 08:32:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:42 UTC