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

Issues with box-shadow spread

From: Behdad Esfahbod <behdad@behdad.org>
Date: Wed, 01 Dec 2010 00:15:14 -0500
Message-ID: <4CF5D9E2.8000803@behdad.org>
To: "www-style@w3.org list" <www-style@w3.org>
Hi all,

Re:

http://www.w3.org/TR/2010/WD-css3-background-20100612/#the-box-shadow


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.

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.

behdad
Received on Wednesday, 1 December 2010 05:15:44 GMT

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