Skip to content

Commit 277941c

Browse files
committed
[css-tables] Added formal dfn of the table-wrapper box
1 parent a2934e8 commit 277941c

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

css-tables-3/Overview.bs

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ spec:css21; type:property; text:max-width
186186
the following wording is also being used in this spec:
187187

188188
<dl>
189+
190+
<dt><dfn id="table-wrapper-box">table-wrapper</dfn> box
191+
<dd>
192+
An anonymous box <a href="#fixup-algorithm">generated around table-root boxes</a> to account for any space occupied by each <a>table-caption</a> it owns.
193+
189194
<dt><dfn id="table-root-element">table-root</dfn> box or element
190195
<dd>
191196
A <a>table</a> or <a>inline-table</a> box.
@@ -345,6 +350,20 @@ spec:css21; type:property; text:max-width
345350
<a class="hint" href="https://jsfiddle.net/hj2w7wwa/7/">Testcase</a>
346351
<a class="hint" href="https://jsfiddle.net/hj2w7wwa/8/">Testcase</a>
347352
<a class="hint" href="https://jsfiddle.net/hj2w7wwa/9/">!Testcase</a>
353+
354+
<li>An anonymous <a>table-wrapper</a> box must be generated around each <a>table-root</a>.
355+
Its display type is <code>inline-block<code> for <a>inline-table</a> boxes and block for <a>table</a> boxes.
356+
The table wrapper box establishes a block formatting context. The table-root box (not the table-wrapper box) is used when doing baseline vertical alignment for an 'inline-table'.
357+
The width of the table-wrapper box is the border-edge width of the table box inside it.
358+
Percentages which would depend on the 'width' and 'height' on the table-wrapper box's size are relative to the table-wrapper box's containing block instead, not the table-wrapper box itself.
359+
360+
The computed values of properties 'position', 'float', 'margin'-*, 'top', 'right', 'bottom', and 'left' on the table element are used on the table-wrapper box and not the table box;
361+
all other values of non-inheritable properties are used on the table box and not the table wrapper box. (Where the table element's values are not used on the table and table wrapper boxes, the initial values are used instead.)
362+
<p class="note">
363+
Since this does not have any effect on layout,
364+
implementations are free not to generate this box when the table-root has no table-caption.
365+
366+
348367
</ol>
349368
</li>
350369
</ol>
@@ -2179,11 +2198,15 @@ spec:css21; type:property; text:max-width
21792198
<p>
21802199
Once the width of each column and the height of each row of the table grid has been determined,
21812200
the final step of algorithm is to assign to each table-internal box its final position.
2201+
<p>
2202+
The <a>table-wrapper</a> box is then sized such that
2203+
it contains the margin box of all <a>table-non-root</a> elements
2204+
as well as the <a>table-root</a> border-box.
21822205

21832206
<div class="note">
21842207
The position defined here is the position of the children
2185-
inside the space reserved for the table, which excludes only its margins.
2186-
This is because the captions of the table are somewhat outside the border-box area of the table.
2208+
inside the space reserved for the table-wrapper, which excludes only its margins.
2209+
This is because the captions of the table are located outside the border-box area of the table-root.
21872210
</div>
21882211

21892212
<p>

0 commit comments

Comments
 (0)