Re: [css-containment] What does "contain:layout" do on table parts?

On Thursday 2015-07-30 13:05 -0700, Daniel Holbert wrote:
> Hi www-style (Tab in particular),
> 
> What should happen if someone sets "contain:layout" on a table-part? (An
> element with one of the various "display: table-*" values from
> http://www.w3.org/TR/CSS21/visuren.html#propdef-display )
> 
> For example, on a row:
>  <table border>
>    <tr style="contain:layout"><td>First Row</td></tr>
>    <tr><td>Second Row</td></tr>
>  </table>
> 
> The spec just says the following:
>  # When laying out the containing element, it must be
>  # treated as having no contents. After layout of the
>  # element is complete, its contents must then be laid
>  # out into the containing elementโ€™s resolved size.
> http://dev.w3.org/csswg/css-containment/#containment
> 
> Is this really what we want to happen for a table-row? I can imagine
> that in my example above, this would meant the <tr> would have 0 height,
> and its cell would overflow the second row (with beveled borders
> behaving a bit oddly...)  I suppose we could do something similar for
> table and table-row-group as well. Is that what's supposed to happen?
> 
> I tend to think "contain:layout" doesn't really make sense on most table
> parts, except maaaybe on "display:table-cell"...

I think the "must be a formatting context" bit of
https://drafts.csswg.org/css-containment/#containment-layout ought
to mean that it's not possible for internal table parts to have
contain:layout, since they get changed into something else.  (The
spec doesn't define what, though.)

-David

-- 
๐„ž   L. David Baron                         http://dbaron.org/   ๐„‚
๐„ข   Mozilla                          https://www.mozilla.org/   ๐„‚
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Friday, 31 July 2015 15:53:24 UTC