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

On Feb 18, 2009, at 1:25 AM, fantasai wrote:

>> If the square on the left were drawn with a traditional border, it  
>> would look like the square on the right if we put the shadow inside  
>> the normally opaque parts of the images of the border-image. That's  
>> why I say this is very different from outer shadow, in which the  
>> border-edge casts the shadow. The padding box should just look like  
>> a hole that was cut by the padding edge, not by the border.
>> This is the same reason why I feel that the padding box should be  
>> knocked out any OUTER shadow cast by the image-border. If 8 edges  
>> are involved in the cast shadow instead of 4, then I'm not able to  
>> achieve the same effect and build upon it from there. My  
>> expectation is that if I used nothing but straight edges and solid  
>> opaque pixels in my border images, I should be able to achieve the  
>> same effect as with traditional borders, and not end up with the  
>> image on the right side of this other one instead:
>> http://www.bradclicks.com/cssplay/trad-vs-imageBorder2.png
>
> This is a good argument for knocking out the padding box for outer
> shadows. Robert's point was that here, we assume the author has filled
> the image border all the way to the padding edge at least (if not  
> beyond).
> Otherwise the effect would look really weird, with the shadows on both
> sides like the right side of this image, but clipped sharply at the
> padding edge.

You might think it is weird to clip the shadow at the padding edge,  
but I can absolutely think of cases where that is exactly what I want.  
Like this example is IMO not-too-weird (just kind of abstract in this  
quickie example):

http://www.bradclicks.com/cssplay/clippedBorderDots.png

It would be better if the padding box edge participated in the shadow  
casting, but the idea is that the author could create something in  
which the padding box seemed to be in front of or part of the same  
plane as the border. Even with an all white padding box, it would be  
kind of cool, and I hope I wouldn't be prevented from being able to do  
that (and still have the benefits of a box-shadow fallback).

If I didn't want the shadows to be clipped, I could always put the  
images farther away from the padding box, as I did with the smaller  
dots in the example. I think it would be more weird to have border-box  
painting effects that overlap and intersect with the padding box,  
which has not previously been the case (corner-radius doesn't count,  
because it is something that just changes the shape of the padding  
box, at least conceptually).

On the other hand, I think you mentioned earlier that perhaps we  
needed a key word to cause the middle section of a border-image to be  
automatically transparent or not, and that the presence (or perhaps  
lack) of this keyword could also determine if the shadow intruded on  
the padding box or not. I think that is not a terrible idea, if the  
shadows for image-border are UA-generated.

Received on Wednesday, 18 February 2009 16:43:49 UTC