Skip to content

Commit 935cbbc

Browse files
committed
[css-tables] Added: figure explaining table layout
1 parent ee2d802 commit 935cbbc

File tree

2 files changed

+624
-19
lines changed

2 files changed

+624
-19
lines changed

css-tables-3/Overview.bs

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -653,55 +653,65 @@ spec:css21; type:property; text:max-width
653653

654654
<p>To layout a table, user agents must apply the following actions:
655655
<ol>
656-
<li><b>Determine the amount of rows/columns the table requires.</b>
657-
This is done by executing the steps described in [[#dimensioning-the-row-column-grid]].
658-
659-
<li><b>If the table has at least one caption, compute their minimum width.</b>
660-
This is done by computing their min-content width (including margins and paddings)
656+
<li><b>If the table has at least one caption, compute their minimum width.</b><br/>
657+
This is done by computing their min-content width (including margins, borders and paddings)
661658
under the assumption their parent has a zero width and overflow:visible.
662659
The largest such width will be known as <a href="#capmin">CAPMIN</a>.
663-
660+
661+
<li><b>Determine the amount of rows/columns the table requires.</b><br/>
662+
This is done by executing the steps described in [[#dimensioning-the-row-column-grid]].
663+
664664
<li><b>If the table has at least one cell:</b>
665665
<ol>
666-
<li><b>Apply [[#missing-cells-fixup]] to occupy each slot.</b>
666+
<li><b>Ensure each cell slot is occupied by at least one cell.</b><br/>
667+
This is done by executing the steps described in [[#missing-cells-fixup]].
667668

668-
<li><b>Compute the minimun width of each row/column.</b>
669+
<li><b>Compute the minimun width of each row/column.</b><br/>
669670
This is done by executing the steps described in [[#content-measure]].
670671

671-
<li><b>Compute the width of the table.</b>
672+
<li><b>Compute the width of the table.</b><br/>
672673
This is done by executing the steps described in [[#computing-the-table-width]].
673674

674-
<li><b>Distribute the width of the table among columns.</b>
675+
<li><b>Distribute the width of the table among columns.</b><br/>
675676
This is done by executing the steps described in [[#width-distribution-algorithm]].
676677

677-
<li><b>Compute the height of the table.</b>
678+
<li><b>Compute the height of the table.</b><br/>
678679
This is done by executing the steps described in [[#computing-the-table-height]].
679680

680-
<li><b>Distribute the height of the table among rows.</b>
681+
<li><b>Distribute the height of the table among rows.</b><br/>
681682
This is done by executing the steps described in [[#height-distribution-algorithm]].
682683

683684
</ol>
684685

685686
<b>Else, if the table is empty:</b>
686687
<ol>
687-
<li><b>Compute the width of the table.</b>
688+
<li><b>Compute the width of the table.</b><br/>
688689
This is done by returning the largest value of <a href="#capmin">CAPMIN</a>
689-
and the computed width of the table box (including paddings)
690-
if it is different definite (zero otherwise).
690+
and the computed width of the table box (including borders and paddings)
691+
if it is definite (use zero otherwise).
691692

692-
<li><b>Compute the height of the table.</b>
693+
<li><b>Compute the height of the table.</b><br/>
693694
This is done by returning the sum of all table-caption heights
694695
(their width being set to the table width,
695696
with margins taken into consideration appropriately)
696-
and the computed height of the table box (including paddings)
697-
if it is different definite (zero otherwise).
697+
and the computed height of the table box (including borders and paddings)
698+
if it is definite (use zero otherwise).
698699

699700
</ol>
700701

701-
<li><b>Assign to each table-caption and table-cell their position and size.</b>
702+
<li><b>Assign to each table-caption and table-cell their position and size.</b><br/>
702703
This is done by running the steps of [[#bounding-box-assignment]].
703704

704705
</ol>
706+
707+
<figure>
708+
<p class="advisement">
709+
The following schema describes the algorithm in a different way,
710+
to make it easier to understand.
711+
</p>
712+
<img src="images/CSS-Tables-Layout-Merged.svg" style="width: 100%" />
713+
<figcaption>Overview of the table layout algorithm. Not normative.</figcaption>
714+
</figure>
705715

706716
<!--------------------------------------------------------------------------------->
707717
<h3 id="dimensioning-the-row-column-grid">Dimensioning the row/column grid</h3>

0 commit comments

Comments
 (0)