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

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 29 Apr 2010 18:21:17 -0700
Message-Id: <B37CEB01-34BF-4ED1-BFCF-A8AE7328688C@gmail.com>
To: Alex Meiburg <timeroot.alex@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Apr 29, 2010, at 5:16 PM, Alex Meiburg <timeroot.alex@gmail.com>  
wrote:

>  I think "grow" actually represents the idea more clearly than  
> "thicken", if the spread ends up changing the shape.

It does not change the shape any more than having a border changes the  
shape of the padding box. It is an outward offset from the edges of  
the border box visual shape, in the same way that the visual shape  
(and clipping) of the padding box is changed by border-radius being  
applied to the border box. In fact, for inner (aka 'inset') shadows,  
it is almost exactly the same concept (aside from the clipping part).

> If  spread ends up being defined to leave the shape alone, then I  
> think "scale" would be the best.

The word "shape" in the editors draft is in a sentence that was added  
in order to indicate that sharp corners should remain sharp. It was a  
result of a WG teleconference where we said we wanted that  
(maintaining any sharp corners when spread was applied, prior to  
applying any blur). It had nothing to do with wanting to preserve the  
exact proportions of the shadow box.

Spread is a real thing, and a valuable way to control the expansion if  
the shadow, much more so than scaling. Undoing everything that makes  
it spread, and then renaming it "scale" is really changing it into a  
whole other feature.

Simply scaling the shadow doesn't give me the same level of control  
over the shadow edges that spread does, and would be of very limited  
usefulness by comparison.


> ~6 out of 5 statisticians say that the number of statistics that  
> either make no sense or use ridiculous timescales at all has dropped  
> over 164% in the last 5.62474396842 years.
>
> On Thu, Apr 29, 2010 at 2:41 PM, Brad Kemper <brad.kemper@gmail.com>  
> wrote:
>
>
> On Apr 29, 2010, at 1:33 PM, Brian Manthos <brianman@microsoft.com>  
> wrote:
>
> 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***.
>
> Definitely better.
>
> The addition of the word edge near the word sharp helps address the  
> collision I was concerned with.
>
> I'm still bothered by this phrase "should not change shape", in the  
> same way Sylvain is.
> But it seems there's reluctance to remove it even though some of us  
> find it at best confusing and distracting.
>
> I'm not reluctant, just looking at one thing at a time. I also think  
> the word "grow" can be replaced with something more accurate and  
> precise, but I'm not sure what exactly yet. "to be thickened" is  
> more the right idea than "to grow", but not all that precise.
>
> Anyway, how about this to replace that last sentence:
>
> If 'border-radius' is zero, then corners should remain sharp (not  
> rounded) after spread radius is applied and prior to the application  
> of blur radius.
>
>
>
> Minor detail: "should should" -> "should"
>
> Oops.
>
> By the way, fantasai wrote what is in that part of the editors draft  
> now (I think), so she may have more to say about the wording too.
>
Received on Friday, 30 April 2010 01:22:21 GMT

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