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

> From: fantasai [mailto:fantasai.lists@inkedblade.net]


> 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.


This looks good. Only small item not explicitly stated is the question brought 
up by Simon regarding negative spread values larger than one or both of the box 
dimensions, making the shadow disappear. (Conversely for inset, large positive 
spread radii). You already have the 0 flooring for the corner radii but it's 
the same for width and height e.g.

>    | ...................................................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) the corner radii by
>    | the same amount. The spread shadow's width, height and corner
>    | radii all floor at zero. A width and/or height of zero result
>    | in no shadow being drawn.

Received on Friday, 7 May 2010 01:03:57 UTC