Skip to content

Commit 8fcafd8

Browse files
committed
[css2] Edited issue 120 from http://wiki.csswg.org/spec/css2.1
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%403020
1 parent c3455be commit 8fcafd8

9 files changed

Lines changed: 245 additions & 192 deletions

File tree

css2/box.src

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN'>
22

33
<html lang="en">
4-
<!-- $Id: box.src,v 1.78 2010-08-06 19:42:21 bbos Exp $ -->
4+
<!-- $Id: box.src,v 1.79 2010-08-25 23:13:02 bbos Exp $ -->
55
<HEAD>
66
<TITLE>Box model</TITLE>
77
</HEAD>
@@ -287,7 +287,7 @@ Vertical margins</span> may collapse between certain boxes:</p>
287287

288288
<ul>
289289
<li>Two or more adjoining vertical margins of <a
290-
href="visuren.html#block-box">block</a> boxes in the <a
290+
href="visuren.html#block-box">block-level</a> boxes in the <a
291291
href="visuren.html#normal-flow">normal flow</a> collapse. The
292292
resulting margin width is the maximum of the adjoining margin widths.
293293
In the case of negative margins, the maximum of the absolute values
@@ -350,12 +350,12 @@ adjoining to the top margin of its next in-flow block-level
350350
sibling, unless that sibling has <a
351351
href="visuren.html#clearance">clearance.</a></p>
352352

353-
<p>The top margin of an in-flow block-level element is adjoining to
353+
<p>The top margin of an in-flow block box is adjoining to
354354
its first in-flow block-level child's top margin if the element has no
355355
top border, no top padding, and the child has no <a
356356
href="visuren.html#clearance">clearance.</a></p>
357357

358-
<p>The bottom margin of an in-flow block-level element with a 'height'
358+
<p>The bottom margin of an in-flow block box with a 'height'
359359
of 'auto' is adjoining to its last in-flow block-level child's bottom
360360
margin if the element has no bottom padding or border.
361361

css2/page.src

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
22
<html lang="en">
3-
<!-- $Id: page.src,v 2.64 2010-07-07 15:57:37 bbos Exp $ -->
3+
<!-- $Id: page.src,v 2.65 2010-08-25 23:13:02 bbos Exp $ -->
44
<HEAD>
55
<TITLE>Paged media</TITLE>
66
</HEAD>
@@ -305,9 +305,9 @@ class="propinst-widows">'widows'</span></h3>
305305
<!-- #include src=properties/widows.srb -->
306306

307307
<P>The <span class="propinst-orphans">'orphans'</span> property
308-
specifies the minimum number of lines in a block element that must be left
308+
specifies the minimum number of lines in a block container that must be left
309309
at the bottom of a page. The <span class="propinst-widows">'widows'</span> property specifies the minimum
310-
number of lines in a block element that must be left at the top of a page.
310+
number of lines in a block container that must be left at the top of a page.
311311
Examples of how they are used to control page breaks are given below.
312312

313313
<p>Only positive values are allowed.

css2/properties/properties.db

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ table-cell | table-caption | none | inherit;;
551551
/* text-indent;;
552552
<length> | <percentage> | inherit;;
553553
0;;
554-
block-level elements, table cells and inline blocks;;
554+
block containers;;
555555
yes;;
556556
refer to width of containing block;;
557557
visual;;
@@ -562,7 +562,7 @@ table-cell | table-caption | none | inherit;;
562562
left | right | center | justify | inherit;;
563563
a nameless value that acts as 'left' if 'direction' is 'ltr',
564564
'right' if 'direction' is 'rtl';;
565-
block-level elements, table cells and inline blocks;;
565+
block containers;;
566566
yes;;
567567
N/A;;
568568
visual;;
@@ -915,7 +915,7 @@ leftwards | rightwards | inherit;;
915915
/* widows;;
916916
<integer> | inherit;;
917917
2;;
918-
block-level elements;;
918+
block container elements;;
919919
yes;;
920920
N/A;;
921921
visual, paged;;
@@ -924,7 +924,7 @@ leftwards | rightwards | inherit;;
924924
/* orphans;;
925925
<integer> | inherit;;
926926
2;;
927-
block-level elements;;
927+
block container elements;;
928928
yes;;
929929
N/A;;
930930
visual, paged;;

css2/selector.src

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN'>
22
<html lang="en">
3-
<!-- $Id: selector.src,v 2.116 2010-08-06 19:42:21 bbos Exp $ -->
3+
<!-- $Id: selector.src,v 2.117 2010-08-25 23:13:02 bbos Exp $ -->
44
<head>
55
<title>Selectors</title>
66
</head>
@@ -1104,11 +1104,8 @@ paragraph.&lt;/P&gt;
11041104

11051105
<p> The <span class="index-inst"
11061106
title="pseudo-elements:::first-line">:first-line</span> pseudo-element
1107-
can only be attached to a <a
1108-
href="visuren.html#block-level">block-level</a> element, <span
1109-
class="index-inst">inline-block</span>, <span
1110-
class="index-inst">table-caption</span> or a <span
1111-
class="index-inst">table-cell</span>.</p>
1107+
can only be attached to a <a href="visuren.html#block-boxes">block
1108+
container element.</a>
11121109

11131110
<p><a name="first-formatted-line"></a>The "first formatted line" of an
11141111
element may occur inside a
@@ -1287,12 +1284,8 @@ first letter should be included."></p>
12871284
<p>The ':first-letter' also applies if the first letter is in fact a
12881285
digit, e.g., the "6" in "67 million dollars is a lot of money."
12891286

1290-
<p>The :first-letter pseudo-element applies to <span
1291-
class="index-inst">block</span>, <span
1292-
class="index-inst">list-item</span>, <span
1293-
class="index-inst">table-cell</span>, <span
1294-
class="index-inst">table-caption</span> and <span
1295-
class="index-inst">inline-block</span> elements.
1287+
<p>The :first-letter pseudo-element applies
1288+
to <a href="visuren.html#block-boxes">block container elements.</a>
12961289

12971290
<p>The :first-letter pseudo-element can be used with all such elements that
12981291
contain text, or that have a descendant in the same flow that contains

css2/tables.src

Lines changed: 106 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
22
<html lang="en">
3-
<!-- $Id: tables.src,v 2.120 2010-08-04 16:00:58 bbos Exp $ -->
3+
<!-- $Id: tables.src,v 2.121 2010-08-25 23:13:03 bbos Exp $ -->
44
<head>
55
<title>Tables</title>
66
</head>
@@ -272,74 +272,112 @@ element, and a 'table-cell' element. Missing elements generate <a
272272
href="visuren.html#anonymous">anonymous</a> objects (e.g., anonymous
273273
boxes in visual table layout) according to the following rules:
274274

275+
<p>For the purposes of these rules, the following terms are defined:
276+
<dl>
277+
<dt>row group box
278+
<dd>A 'table-row-group', 'table-header-group', or
279+
'table-footer-group'
280+
281+
<dt>proper table child
282+
<dd>A 'table-row' box, row group box, 'table-column' box,
283+
'table-column-group' box, or 'table-caption-box'.
284+
285+
<dt>proper table row parent
286+
<dd>A 'table' or 'inline-table' box or row group box
287+
288+
<dt>internal table box
289+
<dd>A 'table-cell' box, 'table-row' box, row group box,
290+
'table-column' box, or 'table-column-group' box.
291+
292+
<dt>tabular container
293+
<dd>A 'table-row' box or proper table row parent
294+
295+
<dt>consecutive
296+
<dd>Two sibling boxes are consecutive if they have no intervening
297+
siblings other than, optionally, an anonymous inline containing
298+
only white spaces. A sequence of sibling boxes is consecutive if
299+
each box in the sequence is consecutive to the one before it in
300+
the sequence.
301+
</dl>
302+
<p>For the purposes of these rules, out-of-flow elements are
303+
represented as inline elements of zero width and height. Their
304+
containing blocks are chosen accordingly.
305+
306+
<p>The following steps are performed in three stages.
275307
<ol>
276-
<li>If the parent P of a 'table-cell' box T is not a
277-
'table-row', a box corresponding to a 'table-row' will be
278-
generated between P and T. This box will span all consecutive
279-
'table-cell' sibling boxes of T.
280-
281-
<li>If the parent P of a 'table-row' box T is not a 'table',
282-
'inline-table', 'table-header-group', 'table-footer-group' or
283-
'table-row-group' box, a box corresponding to a 'table'
284-
element will be generated between P and T.
285-
If P is an 'inline' box, then the generated box must be an
286-
'inline-table' box instead of a 'table' box.
287-
This box will span all
288-
consecutive sibling boxes of T that require a
289-
'table' parent: 'table-row', 'table-row-group',
290-
'table-header-group', 'table-footer-group', 'table-column',
291-
'table-column-group', and 'table-caption'. T and T's siblings may
292-
also be anonymous 'table-row' boxes generated by rule&nbsp;1.
293-
294-
<li>If the parent P of a 'table-column' box T is not a 'table',
295-
'inline-table', or 'table-column-group' box, a box
296-
corresponding to a 'table' element will be generated between P and
297-
T.
298-
If P is an 'inline' box, then the generated box must be an
299-
'inline-table' box instead of a 'table' box.
300-
This box will span all consecutive sibling boxes
301-
of T that require a 'table' parent: 'table-row',
302-
'table-row-group', 'table-header-group', 'table-footer-group',
303-
'table-column', 'table-column-group', and 'table-caption', including
304-
any anonymous 'table-row' boxes generated by rule&nbsp;1.
305-
306-
<li>If the parent P of a 'table-row-group' (or 'table-header-group',
307-
'table-footer-group', or 'table-column-group' or 'table-caption')
308-
box T is not a 'table' or 'inline-table', a box
309-
corresponding to a 'table' element will be generated between P and
310-
T.
311-
If P is an 'inline' box, then the generated box must be an
312-
'inline-table' box instead of a 'table' box.
313-
This box will span all consecutive sibling boxes
314-
of T that require a 'table' parent: 'table-row',
315-
'table-row-group', 'table-header-group', 'table-footer-group',
316-
'table-column', 'table-column-group', and 'table-caption', including
317-
any anonymous 'table-row' boxes generated by rule&nbsp;1.
318-
319-
<li>If a child T of a 'table', 'inline-table', 'table-row-group',
320-
'table-header-group', 'table-footer-group', or 'table-row' box is an
321-
anonymous inline box that contains only white space, then it is
322-
treated as if it had 'display: none'.
323-
324-
<li>If a child T of a 'table' box (or 'inline-table') P is not a
325-
'table-row-group', 'table-header-group', 'table-footer-group',
326-
'table-caption', 'table-column', 'table-column-group' or 'table-row'
327-
box, a box corresponding to a 'table-row' element will be
328-
generated between P and T. This box spans all consecutive
329-
siblings of T that are not 'table-row-group', 'table-header-group',
330-
'table-footer-group', 'table-caption', 'table-column',
331-
'table-column-group' or 'table-row' boxes.
332-
333-
<li>If a child T of a 'table-row-group' box (or
334-
'table-header-group' or 'table-footer-group') P is not a 'table-row'
335-
box, a box corresponding to a 'table-row' element will be
336-
generated between P and T. This box spans all consecutive
337-
siblings of T that are not 'table-row' boxes.
338-
339-
<li>If a child T of a 'table-row' box P is not a 'table-cell'
340-
box, a box corresponding to a 'table-cell' element will be
341-
generated between P and T. This box spans all consecutive
342-
siblings of T that are not 'table-cell' boxes.
308+
<li>Remove irrelevant boxes:
309+
<ol>
310+
<li>All child boxes of a 'table-column' parent are treated as if
311+
they had 'display: none'.
312+
313+
<li>If a child <var>C</var> of a 'table-column-group' parent is
314+
not a 'table-column' box, then it is treated as if it had
315+
'display: none'.
316+
317+
<li>If a child <var>C</var> of a tabular container <var>P</var>
318+
is an anonymous inline box that contains only white space,
319+
and its immediately preceding and following siblings, if
320+
any, are proper table descendants of <var>P</var> and are
321+
either 'table-caption' or internal table boxes, then it is
322+
treated as if it had 'display: none'. A box <var>D</var> is
323+
a proper table descendant of <var>A</var> if <var>D</var>
324+
can be a descendant of <var>A</var> without causing the
325+
generation of any intervening 'table' or 'inline-table'
326+
boxes.
327+
328+
<li>If a box <var>B</var> is an anonymous inline containing only
329+
white space, and is between two immediate siblings each of
330+
which is either an internal table box or a 'table-caption'
331+
box then <var>B</var> is treated as if it had 'display:
332+
none'.
333+
</ol>
334+
335+
<li>Generate missing child wrappers:
336+
<ol>
337+
<li>If a child <var>C</var> of a 'table' or 'inline-table' box
338+
is not a proper table child, then generate an anonymous
339+
'table-row' box around <var>C</var> and all consecutive
340+
siblings of <var>C</var> that are not proper table children.
341+
342+
<li>If a child <var>C</var> of a row group box is not a
343+
'table-row' box, then generate an anonymous 'table-row' box
344+
around <var>C</var> and all consecutive siblings
345+
of <var>C</var> that are not 'table-row' boxes.
346+
347+
<li>If a child <var>C</var> of a 'table-row' box is not a
348+
'table-cell', then generate an anonymous 'table-cell' box
349+
around <var>C</var> and all consecutive siblings
350+
of <var>C</var> that are not 'table-cell' boxes.
351+
</ol>
352+
353+
<li>Generate missing parents:
354+
<ol>
355+
<li>For each 'table-cell' box <var>C</var> in a sequence of
356+
consecutive internal table and 'table-caption' siblings,
357+
if <var>C</var>'s parent is not a 'table-row' then generate
358+
an anonymous 'table-row' box around <var>C</var> and all
359+
consecutive siblings of <var>C</var> that are 'table-cell'
360+
boxes.
361+
362+
<li>For each proper table child <var>C</var> in a sequence of
363+
consecutive proper table children, if <var>C</var> is
364+
misparented then generate an anonymous 'table' or
365+
'inline-table' box <var>T</var> around <var>C</var> and all
366+
consecutive siblings of <var>C</var> that are proper table
367+
children. (If C's parent is an 'inline' box,
368+
then <var>T</var> must be an 'inline-table' box; otherwise
369+
it must be a 'table' box.)
370+
<ul>
371+
<li>A 'table-row' is misparented if its parent is neither
372+
a row group box nor a 'table' or 'inline-table' box.
373+
<li>A 'table-column' box is misparented if its parent is
374+
neither a 'table-column-group' box nor a 'table' or
375+
'inline-table' box.
376+
<li>A row group box, 'table-column-group' box, or
377+
'table-caption' box is misparented if its parent is
378+
neither a 'table' box nor an 'inline-table' box.
379+
</ul>
380+
</ol>
343381
</ol>
344382

345383
<div class="example">

0 commit comments

Comments
 (0)