W3C home > Mailing lists > Public > www-style@w3.org > February 2009

Re: [CSSWG] Minutes and Resolutions 2009-02-04: box-shadow and border-image

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 12 Feb 2009 17:22:44 -0800
Message-ID: <4994CB64.3000800@inkedblade.net>
To: "www-style@w3.org" <www-style@w3.org>

David Hyatt wrote:
>>     ..and then clip out the padding-box from that, which ordinarily
>>     would not have a shadow from the border cast onto it (or does this
>>     shadow still get drawn behind the padding box?)...
>> You build the element's mask, then you build the shadow, then you cut 
>> the mask out of the shadow by painting alpha=0 with the "source" 
>> Porter-Duff operator using the element's mask as the mask. The alpha 
>> values of the cut-out shadow will be the shadow alpha value multiplied 
>> by (1 - the mask alpha value). So no shadow will draw under the 
>> padding-box.
> I think Brad's point is that no shadow should appear under the original 
> location of the padding box either.  It's a given that the shadow itself 
> when offset will contain only transparent pixels in its own offset 
> padding area, but the offset "border" portion of the shadow should also 
> not appear behind the original padding box.
> Basically you clip out the original padding box from any drawing you do 
> right up front just as with normal box shadow, and then build/paint the 
> shadow as you suggested.

I think, actually, that you don't want to clip out the padding-box area
if, e.g. the middle part of the image is being used. In the cases where
the border image describes a non-rectangular shape, the padding edge will
not really have a graphical meaning, and you'll need to either fill the
entire internal part of the image with a background pattern or leave it
wholly transparent.

I guess this ties in with the suggestion of being able to control whether
the middle part is used or clipped out, possibly defaulting to clipped out.

BTW, Hyatt, on a tangential note.. does Webkit implement this part
   # If the slash is present in the property value, the one to four
   # values after it are used for the width of the border instead of
   # the ‘border-width’ properties (but only if the specified image
   # can be displayed).
and is its effect on layout desired or should it merely be a graphical

Received on Friday, 13 February 2009 01:23:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:24 UTC