Re: [css3-background]Positioning of box-shadow blurs?

The wording here still doesn't specify what should happen if the spread
radius is negative and greater than the border radius. Suppose the border is
an ellipse with axes 8px/16px, and the spread is -10px. How on earth could
this be rendered accurately??? :-(

~6 out of 5 statisticians say that the number of statistics that either make
no sense or use ridiculous timescales at all has dropped over 164% in the
last 5.62474396842 years.
On Fri, Apr 30, 2010 at 5:03 PM, Simon Fraser <smfr@me.com> wrote:

>   On Apr 30, 2010, at 4:47 PM, Brad Kemper wrote:
>
>
> # The third length is a blur radius. Negative values are not allowed. The
> blurring region should be an area the width of this value, running along
> and
> centered on the edge of the shadow shape (a shape that otherwise mimics
> the shape of the border box, including any border-radius, absent the
> application of spread radius).  The shadow should transition from
> the shadow color on the inner edge of this region, to transparent at the
> outer edge of this region. If the blur radius is 0, the shadow has a sharp
> edge, otherwise the larger the value, the more the edge of the shadow is
> blurred.  The exact algorithm is not specified.
>
>
> I wonder if it might be easier to define the shadow in terms of the steps
> required to render it
> 1. Take the element's border box, taking rounded corners into account (but
> excluding outline).
> 2. Fill with black.
> 3. Apply a gaussian blur (could reference SVG filters here??)
> 4. Render behind the background.
>
> Or something like that.
>
>   #The fourth length is a spread radius. Positive values cause the shadow
> to expand in all directions by the specified radius. Negative values cause
> the shadow to contract. If 'border-radius' is zero, then corners should
> remain sharp (not rounded) after spread radius is applied and prior to the
> application of blur radius. Otherwise, the corners of the new shape will
> have radii equal to the corresponding 'border-radius' value plus the
> spread-radius value (or minus the spread-radius value if it is an inset
> shadow, but no less than zero for the final spread shadow corner radius).
>
>
> I think describing the effect of spread in terms of rendering steps would
> clarify how exactly it should behave (and act as a hint to implementors).
>
> Simon
>
>

Received on Saturday, 1 May 2010 01:10:00 UTC