W3C home > Mailing lists > Public > www-validator-css@w3.org > May 2009

Re: Orange not a valid color value

From: Rick Bull <rick@rickbull.com>
Date: Sat, 16 May 2009 23:56:21 +0100
Message-ID: <4A0F4495.7020306@rickbull.com>
To: "Jukka K. Korpela" <jkorpela@cs.tut.fi>
CC: www-validator-css@w3.org
Sorry, I moved the page. Correct link is: 

So, you are saying that orange is valid only in the final CSS 2.1 (as 
per http://www.w3.org/TR/CSS2/syndata.html#value-def-color) but not 2.0, 
and that the validator doesn't check according to the 2.1 final spec? If 
that's the case, will the validator be updated, as surely we should be 
using the latest spec to write CSS?


Jukka K. Korpela wrote:
> Rick Bull wrote:
>>    I received the following error, telling me that orange was not a
>> valid colour, even though it is in the CSS 2 spec.
> It is not valid according to the CSS 2 specification.
>>        URI : http://www.rickbull.com/misc/lotto/index2.php
> 404 Not Found, in varying variations.
>> 49 tr:hover td Value Error : background-color
>> <http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-color>
>> orange is not a color value : orange
> Oddly enough, the CSS lint called "CSS Validator" refers to the CSS 
> 2.1 draft*) for information on CSS syntax, when checking against the 
> CSS 2 specification and specifically reporting an error when CSS 2 is 
> violated but CSS 2.1 would allow the feature.
> *) Which itself says: "This is a draft document and may be updated, 
> replaced or obsoleted by other documents at any time. It is 
> inappropriate to cite this document as other than work in progress."
> The morale? Well, don't use color names. They aren't a particularly 
> good idea anyway. Use a color picker to select the color you want 
> (say, _some_ orange color) and use the numeric value in some format 
> allowed by CSS syntax. Use "CSS Validator" or other linter to check 
> that those values are technically correctly written, among other things.
Received on Saturday, 16 May 2009 22:56:57 UTC

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