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

On Apr 29, 2010, at 4:27 AM, Brian Manthos wrote:

>> It's in that last sentence you quoted below,
>> "The exact algorithm is not specified."
> 
>> And actually, Tab is incorrect, at least in
>> regard to Webkit, which centers the blur along the edge.
> 
> Ah.  So you and the spec are fine with blur spreading in any arbitrary direction as long as it has the designed radius?

I'm fine with the way implementers have implemented blur based on what little there is. There is a pretty limited range of ways a future implementor could get it wrong or be inconsistent (especially considering the ease of referring to existing implementations as a reference). That said, I would personally prefer that the spec be the reference by being a little more specific. For instance:

# 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 otherwise mimicking the shape of the border box, including any border-radius).  The shadow should 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 is sharp, otherwise the larger the value, the more the shadow is blurred.  The exact algorithm is not specified. 

> 
> For example, in one view of the world blurring in the Z direction is technically valid.  You could have some neat effects with elements above and below the shadow with such a blur.

neat != useful | important

I can't imagine an implementor blurring the shadow on the z axis instead of the x/y plane, simply because the spec was not specific enough. And I don't think having part of the blur above the background or other shadows (then next levels up in the stacking order) would look good.

Received on Thursday, 29 April 2010 16:38:44 UTC