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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 28 Apr 2010 12:33:24 -0700
Message-ID: <k2idd0fbad1004281233v2f314dfczf2ecb581f42c971a@mail.gmail.com>
To: Brad Kemper <brad.kemper@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 Wed, Apr 28, 2010 at 10:51 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Apr 28, 2010, at 6:25 AM, Sylvain Galineau wrote:
>> Brad, if you and other others want an effect whereby the shadow of a
>> rectangular box with nearly sharp rounded corners could, given enough
>> spread, turn into a near circle, then that's what we're going to give
>> you. (The smaller the box, the smaller the spread needed to turn the
>> shadow of a box into a blob).
> 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.  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.

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

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

Received on Wednesday, 28 April 2010 19:34:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:45 UTC