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

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 UTC