Re: [css3-background] Curved borders intersecting backgrounds of inner boxes

On Sat, Apr 10, 2010 at 6:04 PM, Zack Weinberg <zweinberg@mozilla.com> wrote:
> "L. David Baron" <dbaron@dbaron.org> wrote:
>
>> On Saturday 2010-04-10 17:14 -0700, Zack Weinberg wrote:
>> > As far as I know, in the absence of border-radius, border-image, or
>> > inset box-shadow it is impossible to make a nested box's background
>> > overlap a containing box's border.  It seems to me that putting the
>> > nested background under the containing border (and inset shadow) and
>> > clipping it to the curve is always the right thing.
>>
>> Well, nested boxes' backgrounds can extend way out of their
>> containing element once explicit heights, negative margins, and a
>> bunch of other features are used.  Clipping those boxes is what
>> 'overflow: hidden' is for.
>
> Those seem qualitatively different, somehow, though I would be hard
> pressed to explain why.  Maybe just that it's pretty easy to get a bad
> rendering like the one in my row two 'by accident' with border-radius,
> whereas if you set a negative margin, that has to be deliberate.

While I am extremely sympathetic to this view, and would love to
support it, I agree with dbaron right now that there's no sane way to
distinguish between when an element should clip its children to the
curve (even without overflow:visible) and when it shouldn't.

I certainly *have* gotten bad renderings before from this effect, I
just don't think we we can do anything sane to treat it.  At least
it's an easy fix when it happens (just pop a border-radius on the
relevant corners of the child, too).

~TJ

Received on Monday, 12 April 2010 15:05:50 UTC