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: Wed, 28 Apr 2010 13:51:45 -0700
Message-Id: <252DA645-01F5-4C28-9A19-3FA89E4FB391@gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Sylvain Galineau <sylvaing@microsoft.com>, fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>, Brian Manthos <brianman@microsoft.com>, Prabs Chawla <pchawla@microsoft.com>
On Apr 28, 2010, at 12:33 PM, "Tab Atkins Jr." <jackalmage@gmail.com>  
wrote:

> On Wed, Apr 28, 2010 at 10:51 AM, Brad Kemper  
> <brad.kemper@gmail.com> wrote:
>>>
>> The outer radius of the spread corners does not extend any further  
>> into the straight-side parts of the path than the rounded corners  
>> of the border-box. So, it is no more of a blob or circle than the  
>> original box.
>
> This is incorrect.

No it isn't. The straight parts do not get any longer or shorter no  
matter how much spread you apply.

> In your "extreme" example png, if we made it more
> extreme with, say, a 200px spread, the shadow would be very nearly
> circular.  It won't ever be exactly, because it will always have 280px
> straight along the top/bottom and 180px straight along the left/right,
> but that straightness quickly becomes nearly visually irrelevant.

The only thing that changes is the proportions, which of course can be  
extreme when you use ridiculously unlikely values, but the proportions  
change regardless. If you start with a 2px by 4px box and add 100px of  
spread, then the width/height proportions are going to change  
enormously even with square corners, with the result looking more like  
a square than like something whose width is twice it's height.

But so what? I can create all kinds of crap by using extreme, huge  
values in almost any property that includes numbers. That's not the  
purpose of it. The purpose is to extend the shadow out by an an equal  
amount all the way around it's edge, without making it any blurrier,  
just as they can in image editing programs. It is useful for when you  
want to see a little more of the non-blurred color without increasing  
the offsets, and for seeing a little bit of the blur on the other side  
of the box without increasing the bluriness. It is an artistic effect  
that is important for the artist to get just the shadow he wants.


>
>> I can see where it might be desirable with rectangular boxes, but I  
>> want whatever we decide to work equivalently when we move beyond  
>> rectangles. Doing it the way I described (like a thickening that is  
>> accomplished the same way as in PostScript editing programs, i.e.  
>> add a same color stroke around the edge), would allow us to  
>> eventually also have an equivalent "spread" value in vector objects  
>> such as SVG. But if we wanted this idea to also work equivalently  
>> for images some day, we should forgo the requirement for sharp  
>> edges, or accept that it would work the same except for the sharp  
>> edge part. Which even that way would be similar to what you'd get  
>> if you stroked the edge.
>
> I'm on the edge right now about how valuable it is to maintain parity
> with future developments.
>
> I think I might be happier if we just said it was a scale, rather  
> than a spread.

We resolved to add spread, because of its usefullness for controlling  
the effect and it was added. If you want to add another value for  
scale, that is a whole other thing.


>
>>> Elika's
>>> definition says that it should look like the top black box.
>>
>> Right, because we discussed all this before, and had a clear  
>> definition, which she put into the spec.
>
> Previous discussions were predicated on a more complex idea of
> box-shadow that was supposed to handle shapes other than rounded
> rectangles.

That's a bit revisionist. Where do you get that idea?
Received on Wednesday, 28 April 2010 20:52:37 GMT

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