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: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 18 Feb 2009 08:43:04 -0800
Cc: "www-style@w3.org" <www-style@w3.org>
Message-Id: <55D5F994-25C8-421D-9BD2-1B0A8EFD7D33@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>

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):


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

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