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

On Apr 29, 2010, at 10:01 AM, Brian Manthos 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 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.
> 
> I concur; much better.  This goes a long way in giving the spec some teeth, and opens the door for testability where right now there's only a slight glow coming out of that door frame.
> 
> Two concerns with that phrasing:
> (1) As I mentioned previously, I hate the use of the word "sharp" because of the collision with the "sharp rounded corners" discussion.  Is there really no other word that can be used here?

I think "sharp" is the word to best describe both, and I don't think there is any ambiguity between talking about "sharp corners" vs. "sharp edges". The "sharp corners" mentioned in the spec are sharp edges that come together at a corner. But see below... 

> (2) For "a shape otherwise mimicking the shape of the border box", addition of the words "prior to application of spread radius" would be good here for clarity.

Oh yeah. How about this:

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

#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 ***prior to the
application of blur radius***.

Received on Thursday, 29 April 2010 17:40:11 UTC