W3C home > Mailing lists > Public > www-style@w3.org > December 2010

Re: Issues with box-shadow spread

From: Behdad Esfahbod <behdad@behdad.org>
Date: Wed, 01 Dec 2010 15:38:37 -0500
Message-ID: <4CF6B24D.9060004@behdad.org>
To: Brad Kemper <brad.kemper@gmail.com>
CC: "www-style@w3.org list" <www-style@w3.org>
On 12/01/10 00:35, Brad Kemper wrote:
> 
> On Nov 30, 2010, at 9:15 PM, Behdad Esfahbod wrote:
> 
>> Hi all,
>>
>> Re:
>>
>> http://www.w3.org/TR/2010/WD-css3-background-20100612/#the-box-shadow
> 
> I do have to update that picture, because the blur doesn't match the spec any more.
> 
> 
>> In reading the CSS Backgrounds and Borders Module Level 3 W3C Working Draft 12
>> June 2010 it occurred to me that the spread distance value of a box-shadow
>> property is not correctly specified.
>>
>> Currently, the spec says that:
>>
>> """The fourth length is a spread distance. Positive values cause the shadow
>> shape to expand in all directions by the specified radius."""
>>
>> However, in the Example XXVIII case, the "Spread Applied" contour does not
>> follow the word of the spec.  If you check the lower left, if one was to
>> follow the word of the spec, one would get a round corner, but what we see is
>> a acute corner.  Ie. the lower-left corner of the Spread Applied contour is
>> simply farther away from the lower-left corner of the box than the specified
>> box-shadow spread value.
> 
> You must have missed this line:
> 
> "For corners with a zero border-radius, however, the corner must remain sharp—the operation is equivalent to scaling the shadow shape."

Indeed I did.  That line is so departed from the line I quoted that I didn't
even doubt that maybe the corner case (pun intended!) is explained later.  For
the least, a note referring the reader to this may be appropriate.

Thanks,
behdad


>> What seems to be the *intent* of the spec is that, in Postscript terms, the
>> spread box is the union of the box and the result of the stroke operation,
>> with line-join=miter and an infinite miter-limit.  I can't describe it in a
>> simpler way.  Negative values of the spread can be prescribed as the box with
>> the stroke area removed instead of added.
> 
> That is more or less accurate in PostScript terms.
> 
> 
> 
Received on Wednesday, 1 December 2010 20:39:12 GMT

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