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: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 22 Oct 2012 10:31:20 -0700
Message-ID: <CAAWBYDC60iREdkkkte0V-3ozwLLoAcD2gbWzw=AmWRpctSt2bg@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: "www-style@w3.org list" <www-style@w3.org>
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?

~TJ
Received on Monday, 22 October 2012 17:32:07 GMT

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