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

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 29 Apr 2010 10:10:24 -0700
Cc: Alex Meiburg <timeroot.alex@gmail.com>, Brian Manthos <brianman@microsoft.com>, www-style@w3.org
Message-Id: <906E7A7B-F170-415A-B91B-B65EA296E7CC@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

On Apr 28, 2010, at 8:23 PM, Tab Atkins Jr. wrote:

> On Wed, Apr 28, 2010 at 8:16 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
>> Now look at this image, where the white has been changed to yellow, so that you can clearly see the extent of the blurred area:
>> 
>> http://www.bradclicks.com/cssplay/Blur-vs-Corner_result.png
>> 
>> This shows that the blur area has extended the boundary of the shadow out 25px, and created a shape with a 50px corner radius! Yet no one is complaining about how it increases the radius from 0 to 50px. This is the same sort of thing that spread does, but with a solid colored brush instead of a fuzzy-edged brush. In fact it is what 'border' does too, but no one complains about it having inner radii that are different from the outer radii. Border is more like inner shadow, in that the radius of the inner part gets smaller than the specified part, but that's just because the spec says to apply the radius to the outside of the border instead of the inside. It could just as easily have gone the other way.
> 
> Indeed.  So we should be completely consistent, then, and do a full
> spread, which will round even the sharpest corner.

I'm not sure I agree with this. I'm a little ambivalent, but I think there is a case for occasionally wanting sharp corners with spread but no blur. Such as in in the second column of the third row of examples here (although in practice with less spread and/or more offset likely):

http://dev.w3.org/csswg/css3-background/#box-shadow-samples

The sharp corners is something you can do when expanding the size of vector shapes (in Adobe Illustrator, this is done with the "Offset Path" command, for instance), whereas blur is pretty much just a raster effect. Sharp corners on spread is a nice to have, and if the author didn't want it (which would be more of an edge case than not, I think) then they could always add 'border-radius:0.1px'. I don't think the cases where an author specifies a trillionth of a pixel in order to get different behavior from different UAs really matters (seems kind of pointless).

Received on Thursday, 29 April 2010 17:11:36 GMT

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