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

Re: [css3-background] box-shadow and border-break

From: Brad Kemper <brad.kemper@gmail.com>
Date: Sun, 1 Feb 2009 10:44:45 -0800
Cc: robert@ocallahan.org, "www-style@w3.org" <www-style@w3.org>
Message-Id: <9143E24B-52A7-493A-A04C-698FBBAAA7D0@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>

On Jan 31, 2009, at 9:53 PM, fantasai wrote:

> Robert O'Callahan wrote:
>> On Sat, Jan 31, 2009 at 9:22 PM, Brad Kemper <brad.kemper@gmail.com  
>> <mailto:brad.kemper@gmail.com>> wrote:
>>    If a box is cut in two, due to a page break, there would be no
>>    border or shadow at the bottom of the first page or at the top of
>>    the next page. It would be as though the box had been sliced  
>> though
>>    the middle somewhere, so that even though it is in two pieces, it
>>    still only has one top and one bottom.
>>    So and shadow visible along the right or left edge should appear
>>    sliced off by the same straight cut that divided the box.  So  
>> you're saying that in my testcase, the shadow of the first box of  
>> the span should disappear, since it's to the right of that box's  
>> right border edge, but the shadow of the second box of the span  
>> should be drawn in its entirety?
>
> No, the shadow of the first box should be drawn except on the (broken)
> left side, and the shadow of the second box should be drawn except
> on the (broken) right side.
>
> Like this:
>
>          +-------
>          |
>          +-------
>            ######
>
> ---------+
>         |#
> ---------+#
> ###########
>
> So if you piece the box back together, it looks exactly as it would
> if it weren't broken.
>
> ~fantasai

Robert,

I'm sorry I didn't notice the attachment the first time. I see now  
that it is a wrapped span that is causing borders on the right and  
then left to not be drawn, and that the entire shadow (not just one  
edge) is complete outside the span (and the body), to the right.

This does seem to be a little bit different from a situation where a  
page break cuts a box in two at the bottom of the page.  In that case,  
every part of the shadow below the de-padded, de-bordered edge that on  
the first page is cut off (because it is at the bottom of the  
continuing box on the next page), including padding-bottom, border- 
bottom, and any part of the shadow that extends below the content-box  
of the first page. So I don't think the prose quite captures that.

If your example followed the same logic horizontally, it DOES now seem  
to me that there would be no shadow on the first line (because even  
the left edge of the shadow is to the right of where it would be cut  
off). And that the missing 52px-wide shadow would appear in whole on  
the second line, with the right side if the shadow 100px from the  
right side of the outer span.

That would follow the logic of what that sentence is meaning to say,  
but neither Mozilla or WebKit is doing this yet.

It does seem to me that this should be taken out of "4.8 The ‘box- 
shadow’ property", and should be covered in "4.6 The ‘border-break’  
property". Perhaps in that section, the following:

If the style is set to ‘none’, no border and no padding are inserted  
at the break.

should be expanded to this:

If the style is set to ‘none’, no border and no padding are inserted  
at the break, and all contents and properties that would normally  
render something below that edge are suppressed. This includes  
clipping the box-shadow and any absolutely positioned contents, and  
suppressing the border-image for that edge. The end result should be  
as though the elements were rendered with no break present, and then  
sliced by the break afterward.
Received on Sunday, 1 February 2009 18:45:24 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:16 GMT