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

Re: [css3-background] box-shadow spread radius and rounded corners

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 04 May 2010 18:11:23 -0700
Message-ID: <4BE0C5BB.9000808@inkedblade.net>
To: Sylvain Galineau <sylvaing@microsoft.com>
CC: "www-style@w3.org" <www-style@w3.org>, Brian Manthos <brianman@microsoft.com>, Prabs Chawla <pchawla@microsoft.com>
On 04/27/2010 05:31 PM, Sylvain Galineau wrote:
> Note: the WG has resolved to add box-shadow back to CSS3 Background&  Borders [1] but as the
> editor's draft has not yet been updated, the following refers to the last document version for which
> it was defined [2].
>
> According to the spec:
>
> # The fourth length is a spread radius. Positive values cause the shadow to grow in all directions by the
> # specified radius. Negative values cause the shadow to shrink. The shadow should not change shape
> # when a spread radius is applied: sharp corners should remain sharp.
> ...
> Given that preserving the overall shape is desirable and that the number of alternatives to achieve it should
> be fairly small, is this something implementors are interested in defining interoperably as part of this edit ?

Ok, so here's what I've got so far:

   | The fourth length is a spread radius. Positive values cause
   | the shadow shape to expand in all directions by the specified
   | radius. Negative values cause the shadow shape to contract. For
   | corners with a zero border-radius, the corner remains sharp.
   | Otherwise the spread radius outsets the edge of the shadow by
   | the amount of the spread radius in the direction perpendicular
   | to the shadow's edge. (Note that for inner shadows, expanding
   | the shadow means shrinking the shadow's perimeter.) The UA may
   | approximate the spread shape by outsetting (insetting, for inner
   | shadows) the shadow's straight edges by the spread radius and
   | increasing (decreasing, for inner shadows) and flooring at zero
   | the corner radii by the same amount.

This preserves a strict geometrical definition of "spread", but allows
the UA to approximate it with an easy-to-draw shape. I kept the "leave
corners sharp" option, since it's probably useful, although I do not
have a strong opinion on it at this point.

What do people think?

~fantasai
Received on Wednesday, 5 May 2010 01:11:59 GMT

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