W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [css4-background][css-text-decor-3][filter-effects] shadow with horizontal and vertical blur radius

From: Dirk Schulze <dschulze@adobe.com>
Date: Mon, 22 Oct 2012 10:37:32 -0700
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: "www-style@w3.org list" <www-style@w3.org>
Message-ID: <6D47D275-0267-4767-93C5-78ED2B2F8273@adobe.com>

On Oct 22, 2012, at 10:31 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Mon, Oct 22, 2012 at 6:06 AM, Dirk Schulze <dschulze@adobe.com> wrote:
>> I would like to discuss different blur radii for the horizontal and vertical direction. I got a request to add this for the blur() function in Filter Effects[1]. Since Filter Effects, CSS Text Decoration[2] and CSS Background and borders[3] use (fairly) the same syntax, I think it makes sense to discuss this in a global spec scope.
>> Sadly the shadow syntax does not use comma separation, which makes syntax changes a bit difficult. Maybe we can still come up with a proposal:
>>        <shadow> = inset? && [ [<length>{2} [<length>[/<length>]?] <length>?] && <color>? ]
>> This may look complicated but isn't that hard:
>>        box-shadow: 64px 64px 12px/6px 40px rgba(0,0,0,0.4);
>> Would create a black shadow with a horizontal blur radius of 12px and a vertical blur radius of 6px. Both blur radii are separated by "/". If the second parameter is missing, the vertical blur is equal to the horizontal blur. Which makes it backwards compatible.
>> All values need to be animatable separately.
> What's the math for different blur radiuses?  Since 2d Gaussians are
> normally doable just by doing two 1d Gaussians in the x and y
> directions, is it simply a matter of making the two 1d Gaussians use a
> different radius?
The kernel for the gaussian blur would have a different dimension instead of quadratic. It can (and is) simulated by implementation doing 3 one dimensional box blur passes per direction. So basically like you said.


> ~TJ
Received on Monday, 22 October 2012 17:38:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:22 UTC