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

Re: [css3-background] vastly different takes on "blur"

From: fantasai <fantasai.lists@inkedblade.net>
Date: Sat, 12 Jun 2010 11:03:24 -0700
Message-ID: <4C13CBEC.5070105@inkedblade.net>
To: Simon Fraser <smfr@me.com>
CC: Brad Kemper <brad.kemper@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, Brian Manthos <brianman@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
On 06/11/2010 03:44 PM, Simon Fraser wrote:
> On Jun 11, 2010, at 3:18 PM, fantasai wrote:
>
>> On 06/11/2010 02:03 PM, Brad Kemper wrote:
>>> On Jun 11, 2010, at 11:13 AM, Simon Fraser<smfr@me.com>  wrote:
>>>
>>>> I don't think the current definition, which describes the blur in
>>>> terms of a gradient, is good for shapes with concave portions.
>>>
>>> I don't know why not. It doesn't say it's a gradient, it just defines
>>> the size of the region to blur within. I think that saying that a 15px
>>> blur covers a perimeter that is 15px wide will be a whole lot more
>>> understandable and predictable and meaningful for authors than to ask
>>> them to guess how much that will be based on the results of plugging
>>> that length into a guassian function.
>>
>> What Simon is trying to say is that it's not a straight-up transition
>> of 15px.
>>
>> If I'm understanding this correctly (I'm shooting in the dark here),
>> the Gaussian function, when applied to concave shapes like the inside
>> of a corner, will result in an effective "radius" that is much larger
>> at certain points. This is in fact what you want: otherwise the corner
>> doesn't look blurred, it looks gradient-ed.
>>
>> Imagine a sharp concave corner (i.e. the border with an inner shadow).
>> If you put a true Gaussian blur on that, the edge where the shadow
>> finally disappears will have a slight curve.
>>
>>      +--------------     [ I lack hixie's awesome ascii art skillz,
>>      |                     but I'm trying here... ]
>>      |         _____
>>      |      ,'
>>      |     :
>>      |     |
>>      |     |
>>
>> In the current definition, you'll get a sharp edge.
>>
>>      +--------------
>>      |
>>      |      ________
>>      |     |
>>      |     |
>>      |     |
>>      |     |
>>
>> If I'm understanding this correctly, applying a true Gaussian and
>> then thresholding it will probably fix those weird kinks you were
>> seeing on inner shadow spreads with the current definition.
>
> Yes, this is exactly the issue.

Ok, I've updated the spec text:
   http://dev.w3.org/csswg/css3-background/#the-box-shadow
   http://dev.w3.org/cvsweb/csswg/css3-background/Overview.src.html.diff?r1=1.230&r2=1.231&f=h

Let me know if this is better.

~fantasai
Received on Saturday, 12 June 2010 18:04:04 GMT

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