Skip to content

Commit 25b52a0

Browse files
committed
Used foot instead of tail (as in css3-writing-modes). Nicer table for meaining of head/foot, with images
1 parent fb5de44 commit 25b52a0

1 file changed

Lines changed: 76 additions & 55 deletions

File tree

css3-box/Overview.src.html

Lines changed: 76 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@
1212
<meta content="text/html; charset=utf-8" http-equiv=content-type>
1313
<title>CSS basic box model</title>
1414

15+
<link href="../default.css" rel="stylesheet"
16+
title="Default" type="text/css">
1517
<style type="text/css">
1618
ol.stack p {margin-top: 0}
1719
img.small {max-width: 100%}
20+
.equiv-table tr {vertical-align: baseline}
21+
.equiv-table img {max-width: 12em; max-width: 100%}
22+
.minidiagram {height: 5em; vertical-align: middle}
23+
/* Undo the max-width in the 2012 style for editor's drafts: */
24+
body {max-width: none}
1825
</style>
26+
<link href="http://www.w3.org/StyleSheets/TR/W3C-MO.css" rel="stylesheet"
27+
title="Default" type="text/css">
1928

2029
<link rel=contents href="#contents">
2130
<link rel=index href="#index">
22-
<link href="../default.css" rel="stylesheet"
23-
title="Default" type="text/css">
24-
<link href="http://www.w3.org/StyleSheets/TR/W3C-MO.css" rel="stylesheet"
25-
title="Default" type="text/css">
2631

2732

2833

@@ -388,7 +393,7 @@ <h2>Introduction &amp; definitions</h2>
388393
<p>Note that there are theoretically eight possible orientations for
389394
text, but CSS only defines six:
390395

391-
<table class=equiv-table>
396+
<table class=equiv-table style="table-layout: fixed; width: 100%">
392397
<thead>
393398
<tr>
394399
<th>
@@ -422,8 +427,8 @@ <h2>Introduction &amp; definitions</h2>
422427
alt="">
423428
<td>
424429
<p>Text is written bottom to top and paragraphs grow to
425-
the right <p><img class=small src="vertical-lr-rtl.png"
426-
alt="">
430+
the right <p><img class=small
431+
src="vertical-lr-rtl.png" alt="">
427432
</table>
428433

429434
<p>There is no “horizontal-bt.” More information about 'writing-mode'
@@ -448,25 +453,39 @@ <h2>Introduction &amp; definitions</h2>
448453
<table class=equiv-table>
449454
<thead>
450455
<tr>
451-
<th>Value of 'writing-mode'
452-
<th>Value of 'direction'
453-
<th>Meaning of “head”
454-
<th>Meaning of “end”
455-
<th>Meaning of “foot”
456-
<th>Meaning of “start”
456+
<th rowspan=2>Value of<br>'writing-mode'
457+
<th rowspan=2>Value of<br>'direction'
458+
<th colspan=4>Meaning of…
459+
<th rowspan=2>
460+
<tr>
461+
<th>“head”
462+
<th>“end”
463+
<th>“foot”
464+
<th>“start”
457465
<tbody>
458-
<tr><th rowspan=2>''horizontal-tb'' <th>''ltr''
459-
<td>top <td>right <td>bottom <td>left
460-
<tr><!-- horizontal-tb --><th>''rtl''
461-
<td>top <td>left <td>bottom <td>right
462-
<tr><th rowspan=2>''vertical-rl'' <th>''ltr''
463-
<td>right <td>bottom <td>left <td>top
464-
<tr><!-- vertical-rl'' --><th>''rtl''
465-
<td>right <td>top <td>left <td>bottom
466-
<tr><th rowspan=2>''vertical-lr'' <th>''rtl''
467-
<td>left <td>bottom <td>right <td>top
468-
<tr><!-- vertical-lr --><th>''ltr''
469-
<td>left <td>top <td>right <td>bottom
466+
<tr><th rowspan=2>''horizontal-tb'' <th>''ltr'' <td>top
467+
<td>right <td>bottom <td>left <td><img class=minidiagram
468+
src="box-tb-ltr.svg" alt="">
469+
470+
<tr><!-- horizontal-tb --><th>''rtl'' <td>top <td>left
471+
<td>bottom <td>right <td><img class=minidiagram
472+
src="box-tb-rtl.svg" alt="">
473+
474+
<tr><th rowspan=2>''vertical-rl'' <th>''ltr'' <td>right
475+
<td>bottom <td>left <td>top <td><img class=minidiagram
476+
src="box-rl-ltr.svg" alt="">
477+
478+
<tr><!-- vertical-rl'' --><th>''rtl'' <td>right <td>top
479+
<td>left <td>bottom <td><img class=minidiagram
480+
src="box-rl-rtl.svg" alt="">
481+
482+
<tr><th rowspan=2>''vertical-lr'' <th>''ltr'' <td>left
483+
<td>bottom <td>right <td>top <td><img class=minidiagram
484+
src="box-lr-ltr.svg" alt="">
485+
486+
<tr><!-- vertical-lr --><th>''rtl'' <td>left <td>top <td>right
487+
<td>bottom <td><img class=minidiagram src="box-lr-rtl.svg"
488+
alt="">
470489
</table>
471490

472491
<p class=note>For example, the “head padding” by default refers to the
@@ -496,7 +515,7 @@ <h2>Introduction &amp; definitions</h2>
496515
modules.
497516

498517
<p class=note>The block dimension of a box is thus the distance
499-
between the head and tail edges, while the inline dimension of the box
518+
between the head and foot edges, while the inline dimension of the box
500519
is the distance between the start and end edges.
501520

502521
<p>When boxes are laid out in sequence to form a <em class=index
@@ -513,12 +532,14 @@ <h2>Introduction &amp; definitions</h2>
513532
<table class=equiv-table>
514533
<thead>
515534
<tr>
516-
<th>'writing-mode' of <em>containing block</em>
517-
<th>'direction' of <em>containing block</em>
518-
<th>Meaning of “A”
519-
<th>Meaning of “B”
520-
<th>Meaning of “C”
521-
<th>Meaning of “D”
535+
<th rowspan=2>'writing-mode' of<br><em>containing block</em>
536+
<th rowspan=2>'direction' of<br><em>containing block</em>
537+
<th colspan=4>Meaning of…
538+
<tr>
539+
<th>“A”
540+
<th>“B”
541+
<th>“C”
542+
<th>“D”
522543
<tbody>
523544
<tr><th rowspan=2>''horizontal-tb'' <th>''ltr''
524545
<td>top <td>right <td>bottom <td>left
@@ -542,7 +563,7 @@ <h2>Introduction &amp; definitions</h2>
542563
first paragraph is at the top edge (= head edge) of the document, the
543564
top (A edge) of the second paragraph is against the bottom (C edge) of
544565
the first paragraph, and so on, until the bottom (C edge) of the last
545-
paragraph becomes the bottom (tail edge) of the document.
566+
paragraph becomes the bottom (foot edge) of the document.
546567

547568

548569

@@ -769,7 +790,7 @@ <h2>Flows</h2>
769790
is <span>collapsed through,</span> then its <span>content
770791
edge</span> (which is also its <span>border edge</span>
771792
and <span>padding edge</span>) is defined as what it would
772-
have been if the box had a non-zero <span>tailside</span>
793+
have been if the box had a non-zero <span>footside</span>
773794
border. (I.e., recompute the margins given that border and
774795
then apply the previous rule.)
775796
@@ -2315,14 +2336,14 @@ <h3 id=collapsing-margins>Collapsing margins</h3>
23152336

23162337
<li>If a <em>horizontal</em> element has a 'height' that is not
23172338
''auto'', or if setting its 'min-height' and 'max-height' to their
2318-
initial values would change its used height, then the <em>tail</em>
2339+
initial values would change its used height, then the <em>foot</em>
23192340
margin of the element does not collapse with any of its children's
23202341
margins. <span class=issue>[Check with latest CSS 2.1 if min/max
23212342
width/height still have this effect.]</span>
23222343

23232344
<li>Similarly, if a <em>vertical</em> element has a 'width' that is
23242345
not ''auto'', or if setting its 'min-width' and 'max-width' to their
2325-
initial values would change the used width, then the <em>tail</em>
2346+
initial values would change the used width, then the <em>foot</em>
23262347
margin of the element does not collapse with any of its children's
23272348
margins. <span class=issue>[Check with latest CSS 2.1 if min/max
23282349
width/height still have this effect.]</span>
@@ -2343,15 +2364,15 @@ <h3 id=collapsing-margins>Collapsing margins</h3>
23432364
<p>A margin of a box collapses with the <em>head</em> margin of
23442365
its parent box if those two margins are <em>adjoining.</em>
23452366

2346-
<!-- parent-child / tail -->
2367+
<!-- parent-child / foot -->
23472368
<li>
2348-
<p>A margin of a box collapses with the <em>tail</em> margin of
2369+
<p>A margin of a box collapses with the <em>foot</em> margin of
23492370
its parent box if those two margins are <em>adjoining.</em>
23502371

23512372
<!-- sibling -->
23522373
<li>
23532374
<p>The <em>head</em> margin of a box collapses with the
2354-
<em>tail</em> margin of a sibling box if the two margins are
2375+
<em>foot</em> margin of a sibling box if the two margins are
23552376
<em>adjoining.</em>
23562377

23572378
<!-- self top-bottom -->
@@ -2378,9 +2399,9 @@ <h3 id=collapsing-margins>Collapsing margins</h3>
23782399
same as the parent's head border edge.
23792400

23802401
<li>Otherwise, either the parent is not taking part in the margin
2381-
collapsing, or only the parent's <em>tail</em> margin is involved.
2402+
collapsing, or only the parent's <em>foot</em> margin is involved.
23822403
The position of A's head border edge is defined to be the same as it
2383-
would have been if A had a nonzero <em>tail</em> border.
2404+
would have been if A had a nonzero <em>foot</em> border.
23842405
</ul>
23852406

23862407
<p class=note>Note that box A itself is invisible and its position
@@ -2727,8 +2748,8 @@ <h3 id=blockwidth>Block-level, non-replaced elements
27272748
elements in normal flow when 'overflow' does not compute to
27282749
''visible'' but has been propagated to the viewport.
27292750

2730-
<p>The used values of the <span>head</span> padding, <span>tail</span>
2731-
padding, <span>head</span> margin and <span>tail</span> margin are
2751+
<p>The used values of the <span>head</span> padding, <span>foot</span>
2752+
padding, <span>head</span> margin and <span>foot</span> margin are
27322753
calculated from their computed values, with any ''auto'' values
27332754
replaced by 0.
27342755

@@ -2749,12 +2770,12 @@ <h3 id=blockwidth>Block-level, non-replaced elements
27492770
that doesn't have its margins <span>collapsed through.</span>
27502771

27512772
<li>For the second edge: If the element is the <span>root
2752-
element</span> or if it has a non-zero <span>tail</span> padding or a
2753-
non-zero <span>tail</span>
2754-
border, then the second edge is the <span>tailside</span> <em>margin
2773+
element</span> or if it has a non-zero <span>foot</span> padding or a
2774+
non-zero <span>foot</span>
2775+
border, then the second edge is the <span>footside</span> <em>margin
27552776
edge</em> of the last <span>line box</span> or <span>block-level
27562777
box</span> (whichever comes last); otherwise the second edge is the
2757-
<span>tailside</span> <em>border edge</em> of the last <span>line
2778+
<span>footside</span> <em>border edge</em> of the last <span>line
27582779
box</span> or <span>block-level box</span> (whichever comes last) that
27592780
doesn't have its margins <span>collapsed through.</span>
27602781
</ul>
@@ -2936,8 +2957,8 @@ <h3>Other block-level, non-replaced elements in normal flow</h3>
29362957
elements when 'overflow' does not compute to ''visible'' (except if
29372958
the 'overflow' property's value has been propagated to the viewport).
29382959

2939-
<p>The used values of <span>head</span> padding, <span>tail</span>
2940-
padding, <span>head</span> margin and <span>tail</span> margin are
2960+
<p>The used values of <span>head</span> padding, <span>foot</span>
2961+
padding, <span>head</span> margin and <span>foot</span> margin are
29412962
calculated from the computed values, with any ''auto'' values replaced
29422963
by 0.
29432964

@@ -2957,7 +2978,7 @@ <h3>Other block-level, non-replaced elements in normal flow</h3>
29572978
<h3>'Inline-block' or floating, non-replaced
29582979
elements</h3>
29592980

2960-
<p class=issue>Not yet generalized with head, tail, etc.
2981+
<p class=issue>Not yet generalized with head, foot, etc.
29612982

29622983
<p>The used values of 'margin-left', 'margin-right', 'margin-top' and
29632984
'margin-bottom' are derived from their computed values, except that a
@@ -3889,12 +3910,12 @@ <h2>The clear-after property</h2>
38893910
property increases the element's padding as needed. More precisely: If
38903911
there are any floats in the current <em>flow</em> up to and including
38913912
the end of this element that float to the indicated side(s), then find
3892-
the one whose <em>tailside</em> <em>margin edge</em> is furthest away
3913+
the one whose <em>footside</em> <em>margin edge</em> is furthest away
38933914
from the <em>head</em> <em>content edge</em> of the <em>containing
3894-
block.</em> Then increase the tailside padding of the current element
3915+
block.</em> Then increase the footside padding of the current element
38953916
by the minimum amount needed so that the padding edge is at least as
38963917
far away from the head content edge of the containing block as the
3897-
tailside margin edge of that float.
3918+
footside margin edge of that float.
38983919

38993920
<p class=note>Note: Since a floating element is a <em>flow root,</em>
39003921
setting 'clear-after' on such an element only
@@ -4096,14 +4117,14 @@ <h3 id=overflow>The overflow, overflow-x and overflow-y properties</h3>
40964117
cause a <em>scrolling mechanism</em> to be provided for
40974118
overflowing boxes.
40984119

4099-
<dt class=issue><dfn>no-display</dfn>
4120+
<dt><dfn>no-display</dfn>
41004121

41014122
<dd class=issue>When the content doesn't fit in the content box,
41024123
the whole box is removed, as if 'display: none' were specified.
41034124
[This idea is due to Till Halbach &lt;tillh@opera.com&gt;, July
41044125
21, 2005]
41054126

4106-
<dt class=issue><dfn>no-content</dfn>
4127+
<dt><dfn>no-content</dfn>
41074128

41084129
<dd class=issue>When the content doesn't fit in the content box,
41094130
the whole content is hidden, as if 'visibility: hidden' were

0 commit comments

Comments
 (0)