W3C home > Mailing lists > Public > www-validator-css@w3.org > October 2012

Re: text-shadow bug?

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Tue, 16 Oct 2012 19:58:41 +0300
Message-ID: <507D9241.4020202@cs.tut.fi>
To: www-validator-css@w3.org
2012-10-15 22:35, S. D. Salyer wrote:

> I have in my CSS text-shadow properties with percentages for length such as:
> text-shadow: 50% 50% 15% #c0c0c0;
> The Validator suggests these are incorrect:
> Value Error : text-shadow
> <http://jigsaw.w3.org/css-validator/nulltext.html#propdef-text-shadow> 50%
> is not a color value : 50% 50% 15% #c0c0c0

The error message is confusing, but it correctly points to an error. 
Percentages are not allowed here,

> I'm not sure if the percentages are throwing it off, or if the problem
> is the color code coming at the end instead of the beginning.  The CSS3
> Specification states that the color can come before or after the shadow
> lengths.

It's the percentages. The CSS3 draft says that the components of the 
value, apart from the color, are of type <length>:

There is no explicit definition of <length> there, but it is fair to 
assume that the term has the same meaning as in CSS 2.1. And there 
<length> excludes percentages:

If a percentage were allowed, a definition would be needed for it (i.e., 
an answer to the question "per cent of what?").

Received on Tuesday, 16 October 2012 16:59:11 UTC

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