W3C home > Mailing lists > Public > www-style@w3.org > February 2011

[CSS21] Table fix-up algorithm: elements vs boxes

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 7 Feb 2011 13:33:24 -0800
Message-ID: <AANLkTi=LjvB+Q6AQKvrTjBc7_RnKKpHkZtJARN2KgTUP@mail.gmail.com>
To: www-style list <www-style@w3.org>
The table repair algorithm in <> is phrased in terms of boxes, but the
intent (and implementations) seem to be to work over elements instead.
 Can someone clarify precisely what the intent is?

Specifically, take an example like this:

<!doctype html>
.table { display: table; }
.cell { display: table-cell; }
<div class=table>
 <div class=cell>foo</div>
 <span class=cell>bar</span>
   <div class=cell>bar</div>

The table has 5 child boxes (ignoring anonymous inlines containing
only whitespace), because the second <span> is split by its <div>
child.  If the table-repair algo works purely over boxes, there would
be five cells total here, as the first anonymous block generated by
the split <span> is wrapped into an anonymous cell, and so is the
second anonymous block.

But if the table-repair algo works over elements, you'd get three
cells, as the span is wrapped in a single cell before later being
split in half by its div child (when then generates its own anonymous

All implementations treat the table as having 3 cells.  They all do
something slightly different for the contents of the third cell, but
at least they agree on the treatment of the upper level.

I'll be making Flexbox match this behavior, so I'd like to use the
same language that is used here.

Received on Monday, 7 February 2011 21:34:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:56 UTC