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

On Feb 2, 2009, at 7:40 PM, Robert O'Callahan wrote:

> On Tue, Feb 3, 2009 at 10:18 AM, fantasai <fantasai.lists@inkedblade.net 
> > wrote:
>  # If the value of 'border-break' is 'close', then each box is
>  # independently wrapped with the border and padding. The
>  # 'border-radius', 'border-image', and 'box-shadow', if any,
>  # are applied to each box independently.
>  #
>  # If the style is set to 'none', no border and no padding are
>  # inserted at the break. Otherwise, if some other border style
>  # is given, padding is added as wide as the corresponding side
>  # of the 'padding' property and a border is added with the
>  # specified style, width, and color. No box-shadow is drawn
>  # outside the broken edge, and the 'border-image' is rendered
>  # for the whole box as if it were unbroken: the effect is as
>  # though the element were rendered with no break present, and
>  # then sliced by the break afterward.
>
> Let me know if that is clear enough. (Abspos and other content-related
> clipping is outside the scope of this spec.)
>
> This doesn't tell me that the box-shadow for the first box of an  
> element might need to be drawn by the second box of an element.
>

Yes, I think it does. Because the two boxes are treated as though they  
are a single box, for the purpose of where the shadow goes. Then they  
are split, and whatever shadow is one one side of the box sticks with  
that half-box, and whatever shadow is on the other side moves with the  
other half-box (to the next line, next page, or next column). In your  
example, the shadow is drawn in its entirety after where the box would  
split, so that is where it stays. That's explained by this:


>  # In either case [of 'style'], ...No box-shadow is drawn
>  # [at] the broken edge...the effect is as
>  # though the element were rendered with no break present, and
>  # then sliced by the break afterward.

The thing I did find a little confusing (until I re-read it a couple  
times) was the placement of the text about box-shadow, et al. It comes  
right after the part about "some other border-style", but inserts an  
"In either case" to say that it is not just about that. It would read  
more clearly if that text directly followed the part about "border- 
break:close". Its probably the copywriter in me, but I would move that  
text around a little to read in more logical order. Like this:

If the value of ‘border-break’ is ‘close’, then each box is  
independently wrapped with the border and padding. The ‘border- 
radius’, ‘border-image’, and ‘box-shadow’, if any, are applied to each  
box independently.

Otherwise, no box-shadow is drawn at the broken edge; ‘border-radius’  
has no effect at the corners of that edge; and the ‘border-image’ is  
rendered for the whole box as if it were unbroken. The effect on these  
three properties is the same as if the element were rendered with no  
break present, and then sliced by the break afterward. Additionally,  
If the style is set to ‘none’, no border and no padding are inserted  
at the break. If some other border style is given, padding is added as  
wide as the corresponding side of the ‘padding’ property, and a border  
is added with the specified style, width, and color. This occurs on  
both sides of the break.

Received on Tuesday, 3 February 2009 16:58:58 UTC