Skip to content

Commit e1f7308

Browse files
committed
[css2] Incorporated the changes suggested by fantasai
(http://lists.w3.org/Archives/Public/www-style/2002Aug/0286.html and http://fantasai.tripod.com/www-style/2002/table-backgrounds/) and clarified some things about backgrounds of row and column elements. --HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401978
1 parent 57cc583 commit e1f7308

1 file changed

Lines changed: 57 additions & 21 deletions

File tree

css2/tables.src

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: tables.src,v 2.55 2002-08-07 18:19:16 bbos Exp $ -->
3+
<!-- $Id: tables.src,v 2.56 2002-11-28 20:56:38 bbos Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
66
<title>Tables</title>
@@ -614,34 +614,56 @@ class="caption">Schema of table layers.
614614
itself. Like all boxes, it may be transparent.</p>
615615
</li>
616616
<li>
617-
<p>The next layer contains the column groups. The columns groups are
618-
as tall as the table, but they need not cover the whole table
619-
horizontally.</p>
617+
<p>The next layer contains the column groups. Each column group
618+
extends from the top of the cells in the top row to the bottom of the
619+
cells on the bottom row and from the left edge of its leftmost column
620+
to the right edge of its rightmost column. The background extends to
621+
cover the full area of all cells that originate in the column group,
622+
but this extension does not affect background image positioning.
620623
</li>
621624
<li>
622625
<p>On top of the column groups are the areas representing the column
623-
boxes. Like column groups, columns are as tall as the table, but need
624-
not cover the whole table horizontally.</p>
626+
boxes. Each column is as tall as the column groups and as wide as a
627+
normal (single-column-spanning) cell in the column. The background
628+
extends to cover the full area of all cells that originate in the
629+
column, even if they span outside the column, but this this extension
630+
does not affect background image positioning.
625631
</li>
626632
<li>
627-
<p>Next is the layer containing the row groups. Each row group is as
628-
wide as the table. Together, the row groups completely cover the table
629-
from top to bottom.</p>
633+
<p>Next is the layer containing the row groups. Each row group extends
634+
from the top left corner of its topmost cell in the first column to
635+
the bottom right corner of its bottommost cell in the last column.
630636
</li>
631637
<li>
632-
<p>The next to last layer contains the rows. The rows also cover the
633-
whole table.</p>
638+
<p>The next to last layer contains the rows. Each row is as wide as
639+
the row groups and as tall as a normal (single-row-spanning) cell in
640+
the row. As with columns, the background extends to cover the full
641+
area of all cells that originate in the row, even if they span outside
642+
the row, but this this extension does not affect background image
643+
positioning.
634644
</li>
635645
<li>
636646
<p>The topmost layer contains the cells themselves. As the figure
637647
shows, although all rows contain the same number of cells, not every
638-
cell may have specified content. These "empty" cells are transparent
639-
if the value of their 'empty-cells' property is 'hide', letting lower
640-
layers shine through.
641-
</p>
648+
cell may have specified content. If the value of their <span
649+
class="propinst-empty-cells">'empty-cells'</span> property is 'hide'
650+
these "empty" cells are transparent through the cell, row, row group,
651+
column and column group backgrounds, letting the table background show
652+
through.
642653
</li>
643654
</ol>
644655

656+
<p>The edges of the rows, columns, row groups and column groups in the
657+
<a href="#collapsing-borders">collapsing borders model</a> concide
658+
with the hypothetical grid lines on which the borders of the cells are
659+
centered. (And thus, in this model, the rows together exactly cover
660+
the table, leaving no gaps; ditto for the columns.) In the <a
661+
href="#separated-borders">separated borders model,</a> the edges
662+
coincide with the <a href="box.html#border-edge">border edges</a> of
663+
cells. (And thus, in this model, there may be gaps between the rows
664+
and columns, corresponding to the <span
665+
class="propinst-border-spacing">'border-spacing'</span> property.)
666+
645667
<div class="html-example">
646668
<P>In the following example, the first row contains four cells, but
647669
the second row contains no cells, and thus the table background shines
@@ -739,6 +761,16 @@ class="propinst-width">'width'</span> property. A value of 'auto' (for
739761
both 'display: table' and 'display: inline-table') means use the <a
740762
href="#auto-table-layout">automatic table layout</a> algorithm.
741763

764+
<p class=note style="color:red">[Possible change to that last
765+
sentence: the width of a table (but not of an 'inline-table') could in
766+
principle be derived from the containing block's width, exactly as for
767+
block elements, allowing the fixed layout algorithm to be used even if
768+
'width' is 'auto'. This would in addition allow 'table {margin: 1em;
769+
table-layout: fixed}' to create a table that is 100% - 2em wide.
770+
Suggestion by <a
771+
href="http://lists.w3.org/Archives/Public/www-style/2002Aug/0286.html">
772+
Fantasai.</a>]
773+
742774
<P>In the fixed table layout algorithm, the width of each column is
743775
determined as follows:</p>
744776

@@ -1004,8 +1036,9 @@ negative.
10041036

10051037
<p>In this model, each cell has an individual border. The
10061038
<span class="propinst-border-spacing">'border-spacing'</span> property
1007-
specifies the distance between the borders of adjacent cells. This
1008-
space is filled with the background of the table element. Rows,
1039+
specifies the distance between the borders of adjacent cells. In this
1040+
space, the row, column, row group, and column group backgrounds are
1041+
invisible, allowing the table background to show through. Rows,
10091042
columns, row groups, and column groups cannot have borders (i.e., user
10101043
agents must <span class="index-inst" title="ignore"><a
10111044
href="syndata.html#ignore">ignore</a></span> the border properties for
@@ -1046,10 +1079,12 @@ includes "&amp;nbsp;" and other whitespace except ASCII CR ("\0D"), LF
10461079
("\0A"), tab ("\09"), and space ("\20").
10471080

10481081
<P>When this property has the value 'show', borders and backgrounds
1049-
are drawn around empty cells (like normal cells).
1082+
are drawn around/behind empty cells (like normal cells).
10501083

10511084
<P>A value of 'hide' means that no borders or backgrounds are drawn
1052-
around empty cells. Furthermore, if all the cells in a row have a
1085+
around/behind empty cells (see point 6 in <a
1086+
href="#table-layers">17.5.1</a>). Furthermore, if all the cells in a
1087+
row have a
10531088
value of 'hide' and have no visible content, the entire row behaves as
10541089
if it had 'display: none'.
10551090

@@ -1135,13 +1170,14 @@ value for the border style.)
11351170
<li>If none of the styles is 'hidden' and at least one of them is not
11361171
'none', then narrow borders are discarded in favor of wider ones. If
11371172
several have the same <span
1138-
class="propinst-border-width">'border-width'</span> than styles are
1173+
class="propinst-border-width">'border-width'</span> then styles are
11391174
preferred in this order: 'double', 'solid', 'dashed', 'dotted',
11401175
'ridge', 'outset', 'groove', and the lowest: 'inset'.
11411176

11421177
<li>If border styles differ only in color, then a style set on a cell
11431178
wins over one on a row, which wins over a row group, column, column
1144-
group and, lastly, table.
1179+
group and, lastly, table. It is undefined which color is used when
1180+
two elements of the same type disagree.
11451181
</ol>
11461182

11471183
<div class="example">

0 commit comments

Comments
 (0)