Re: Shadows vs. layout

Sent from my iPhone

On Aug 3, 2009, at 11:44 AM, David Hyatt <hyatt@apple.com> wrote:

> I strongly disagree with this change and think it warrants further  
> discussion.
>
> Shadows in WebKit are visual overflow.  If you put a box-shadow on  
> an object near the bottom of a document, you'd expect to be able to  
> scroll to see that shadow.

I would only expect to see as much of the shadow as I had left room to  
see, via padding or margin, for instance. I would absolutely want and  
expect them to be cut off otherwise.

"Does not effect layout" is much less meaningful if the shadows are  
pushing their containers out to make room for them, possibly causing  
reflow of other things as that container changes size and shape.

> It shouldn't simply be cut off.  I see no reason why shadows would  
> be special cased versus all of the other kinds of visual overflow  
> that can occur on a page.

Actually, I consider abs pos items to be the special case. They are  
also supposed to not affect layout, but do (on right and bottom only),  
but only because so many layouts break seriously without that. This is  
not the case with shadows (or border-image, which should also not  
affect layout).

> Shadows are clipped if they spill out of a box with overflow:hidden  
> specified. They are obviously overflow.  Why should overflow:scroll/ 
> auto deliberately ignore this overflow just when scrolling?

Because they are not supposed to affect layout, and I should not have  
to change overflow on it's container to get it to behave as desired  
and expected.

Received on Monday, 3 August 2009 20:23:50 UTC