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

> On 03 Aug 2015, at 23:47, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> On Mon, Aug 3, 2015 at 12:57 PM, Daniel Holbert <dholbert@mozilla.com> wrote:
>> On 08/03/2015 11:22 AM, Tab Atkins Jr. wrote:
>>> I am, personally, okay with the table-row collapsing to nothing, table
>>> layout taking place as if the row was empty, and then the cells (a)
>>> taking their widths from the table columns, which were calculated
>>> without them, possibly causing inline overflow in each cell, and (b)
>>> overflowing the row, overlapping the next visibly.
>> 
>> This could be reasonable behavior, yeah.
>> 
>> (border-collapsing around a "contain:layout" row would probably require
>> some special-case coding & and perhaps speccing, too. I think the rows
>> on either side of a 'contain:layout' row would need to have their cells'
>> borders collapse together, as if the row in between them were really empty.)
> 
> Never mind, too much special-casing, abort abort abort.
> 
>>> But I completely understand if that's not really possible (or at
>>> least, not without a lot of trouble) for our actual codebases, which
>>> might make some assumptions about tables that are difficult/dangerous
>>> to violate.  Is that the case?
>> 
>> For Gecko at least, I think it's possible. Not sure how much trouble
>> it'd be; I think it'd mostly just require a bunch of special cases, and
>> probably some refactoring to support those special cases.
> 
> Not worth adding a bunch of special-casing for a case that nobody
> cares about in the first place.

For table rows/columns, I agree. For table cells, it seems completely reasonable to me to do contain:layout (assuming you also specify a width and height of course). But it's still not completely trivial.

Layout out table cells as if they were empty and then putting back content into them isn't a defined operation as far as I can tell.

If you explicitly set the width or height of a table cell to something larger than what it's automatic with/height, it works, but if you set them to something smaller, the cells do not get smaller.

In other words, there is not such thing as table-layout:fixed on table cells, but we need one if we want contain:layout to work on table cells, which I think we do.

 - Florian

Received on Sunday, 16 August 2015 16:09:52 UTC