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

On Feb 12, 2009, at 12:20 PM, Tab Atkins Jr. wrote:

> On Thu, Feb 12, 2009 at 11:54 AM, David Hyatt <hyatt@apple.com> wrote:
>> Rather than suppressing the shadow, what about using the border- 
>> image as a
>> mask when deciding how to draw the shadow?  In theory it should be  
>> possible
>> to intelligently draw a more complex shadow for a border-image  
>> object.
>
> I think that would answer mine and Brad's concerns perfectly.  Our
> issue is solely that box-shadow currently does *not* do that, so if we
> want a proper shadow we have to build it into the border-image.  But
> then we can't offer shadows to someone who doesn't see the
> border-image for whatever reasons (browser doesn't implement it, they
> refuse images, etc.), because if we were to do so we'd get a double
> shadow (and the second shadow wouldn't even pretend to have a correct
> edge).
>
> So yeah, if you can intelligently draw the shadow based on
> transparency in the border-image, I'd be completely happy.  It would
> reduce the amount of work I had to do, *and* maintain backwards compat
> for users who don't see the border-image.

If box-shadow is going to follow border-radius when no border-image is  
present, then it makes sense to me that it would also fit itself to  
the shape of a border-image if one is present.

At the very least I would hope the spec would not preclude UAs from  
doing something intelligent when border-image and box-shadow are  
specified together.  Our box-shadow code in WebKit already contains a  
FIXME about using the border-image as a mask when drawing box  
shadows. :)

I don't agree with the idea that border-image should suppress box- 
shadow, but I also don't agree with the idea of drawing a box-shadow  
that follows border lines/curves that you don't even plan to display.   
If box-shadow used the border-image as a mask when drawing, then that  
seems like the best solution.

dave
(hyatt@apple.com)

Received on Thursday, 12 February 2009 19:21:14 UTC