W3C home > Mailing lists > Public > www-style@w3.org > January 2009

Re: [css3-background] error in box-shadow examples?

From: Brad Kemper <brad.kemper@gmail.com>
Date: Mon, 26 Jan 2009 10:08:53 -0800
Cc: www-style@w3.org
Message-Id: <3F3D1510-111E-42D4-8686-74BD6C31B5FE@gmail.com>
To: Håkon Wium Lie <howcome@opera.com>


On Jan 26, 2009, at 9:06 AM, Håkon Wium Lie wrote:

> Also sprach Brad Kemper:
>
>>> box-shadow:
>>>   rgba(0,0,0,0.4)
>>>   10px 10px
>>>   10px /* spread */
>>>
>>> box-shadow:
>>>   rgba(0,0,0,0.4)
>>>   10px 10px
>>>   10px /* spread */
>>>   inset
>
>> Huh. That is odd. They seems to be missing a zero for blur radius.
>
> Yes.

This appears to be my fault, as I created those samples. Either a  
simple mistake, or the idea of how and where spread should be added  
was less nailed down at the time. But this is uncontroversial now, I  
believe.

>
>
>> Is that because the definition of <shadow> seems to allow the third
>> length to represent either blur or spread when only three lengths
>> are present?
>
> I don't think so. The spec [1] says:
>
>  The third length is a blur radius.
>
>  The fourth length is a spread radius.
>
> [1] http://dev.w3.org/csswg/css3-background/#box-shadow

Yes, the prose seems pretty clear, if you assume that "fourth" refers  
to the fourth length value as you type it, and not just the fourth  
length value defined in this spec.


> So, if you want to specify a spread, you have to specify the blur as
> well. Therefore, I think the examples should be:
>
>  box-shadow:
>    rgba(0,0,0,0.4)
>    10px 10px 0px
>    10px /* spread */
>
>  box-shadow:
>    rgba(0,0,0,0.4)
>    10px 10px 0px
>    10px /* spread */
>    inset


I agree.

>
>
> -h&kon
>              Håkon Wium Lie                          CTO °þe®ª
> howcome@opera.com                  http://people.opera.com/howcome
Received on Monday, 26 January 2009 18:09:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:15 GMT