Skip to content

Commit 746c4a3

Browse files
committed
[css2] Added a statement clarifying use of containing block, removed containing block details, removed collapsing margins section, added float details
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401330
1 parent 8808f17 commit 746c4a3

1 file changed

Lines changed: 66 additions & 68 deletions

File tree

css2/visuren.src

Lines changed: 66 additions & 68 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: visuren.src,v 2.35 1998-03-21 23:47:19 ijacobs Exp $ -->
3+
<!-- $Id: visuren.src,v 2.36 1998-03-22 02:14:14 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Visual rendering model</TITLE>
@@ -81,21 +81,21 @@ several views of a document.
8181
of a rectangular box called a <span class="index-def"
8282
title="containing block"><dfn>containing block</dfn></span>. A box
8383
establishes reference edges for its descendants and is itself
84-
positioned with respect to its containing block. A box is not confined
85-
by its containing block -- it is positioned with respect to its edges
86-
and may even <a href="visufx.html#overflow">overflow</a> those
87-
edges. When a box is <a href="#floats">floated</a> inside a containing
84+
positioned with respect to its containing block. The phrase "a box's
85+
containing block" means "the containing block in which the box lives",
86+
not the one it generates.
87+
88+
<P>Each box is positioned with respect to its containing block, but it
89+
is not confined by this containing block (it may <a
90+
href="visufx.html#overflow">overflow</a>)
91+
92+
<P>When a box is <a href="#floats">floated</a> inside a containing
8893
block, layout of boxes in the containing block is also affected by the
8994
edges of those floating boxes.
9095

9196
<!-- The above may not be true: inline elements can establish
9297
non-rectangular containing blocks according to the WG -IJ -->
9398

94-
<H4>Containing block details</h4>
95-
96-
<P><em>This section describes the details of how a containing block
97-
is determined. It may be skipped during a first reading.</em>
98-
9999
<P>The root of the <a href="conform.html#doctree">document tree</a>
100100
generates a box that serves as the <span class="index-def"
101101
title="initial containing block|containing block::initial"><a
@@ -112,55 +112,9 @@ class="propinst-position">'position'</span> property) or floated
112112
(i.e., user agents <a href="syndata.html#ignore">ignore</a> the <span
113113
class="propinst-float">'float'</span> property).
114114

115-
<P>The containing block for a box other than the root box determined
116-
as follows:</p>
117-
118-
<ul>
119-
<li>If the value of the <span
120-
class="propinst-position">'position'</span> property for the parent
121-
element is anything but 'static' then the containing block is established
122-
by the parent box.
123-
<li>Otherwise, if the value of the <span
124-
class="propinst-display">'display'</span> property for the parent
125-
element is anything but 'inline' then the containing block is
126-
established by the parent box.
127-
<li>Otherwise, the containing block is the parent's containing block.
128-
</ul>
129-
130-
<P>When the containing block is established by a <a
131-
href="#block-box">block</a> box, it has the same
132-
width, height, and position as the parent's <a
133-
href="box.html#padding-edge">padding edge</a>. The edges
134-
are called the top, bottom, left, and right of the containing block.
135-
136-
<P>When the containing block is established by an <a
137-
href="#inline-level">inline-level</a> element, it has the same width,
138-
height, and position as the <a
139-
href="box.html#padding-edge">padding edge</a> of the first (in the
140-
source tree) box generated by the inline-level element.
141-
142-
<!-- The previous paragraph does not comply with the WG's decision
143-
in. Note, especially, in WG solution, that percentages applied to
144-
negative widths cause problems. -IJ -->
145-
146-
<P><a href="#relative-positioning">Relatively
147-
positioned</a> <a href="#inline-box">inline</a> boxes must be
148-
considered specially since (1) the <a
149-
href="conform.html#rendered-content">rendered content</a> of an inline-level
150-
element may not be rectangular in shape but (2) a relatively
151-
positioned box establishes a new containing block and containing
152-
blocks must be rectangular. The reference edges for descendants
153-
are the following:</p>
154-
155-
<ul>
156-
<li>For left-to-right scripts, the left and top edges are those
157-
of the first inline box. The bottom and right edges are those
158-
of the last inline box.
159-
<li>For right-to-left scripts, the right and top edges are those
160-
of the first inline box. The bottom and left edges are those
161-
of the last inline box.
162-
</ul>
163-
115+
<P>The <a href="visudet.html#containing-block-details">details</a> of
116+
how a containing block's dimensions are calculated are described in
117+
the <a href="visudet.html">next chapter</a>.
164118

165119
<H2><a name="box-gen">Controlling box generation</a></h2>
166120

@@ -528,7 +482,8 @@ following box</a> is established independently of the offset.
528482
<dd> The box coordinates (and possibly size) are calculated
529483
in <a href="#absolute-positioning">absolute</a> terms
530484
with respect to the box's <a
531-
href="#containing-block">containing block</A>.
485+
href="#containing-block">containing block</A>. Absolutely
486+
positioned boxes are taken out of the normal flow.
532487

533488
<dt><strong>fixed</strong>
534489
<dd> The box coordinates are calculated according to the 'absolute'
@@ -630,7 +585,7 @@ these properties).
630585
<P>Absolutely positioned boxes have padding, borders, and margins.
631586
Margins of absolutely positioned boxes do not
632587
<a
633-
href="./visudet.html#collapsing-margins">collapse</a>.
588+
href="box.html#collapsing-margins">collapse</a>.
634589

635590
<P>For more information about the width and height of boxes, please
636591
consult the sections on <a href="visudet.html#box-width">box width
@@ -718,7 +673,7 @@ other, vertically, beginning at the top of a containing block. The
718673
vertical distance between two sibling boxes is determined by the <span
719674
class="propinst-margin">'margin'</span> properties. Vertical margins
720675
between adjacent block boxes <a
721-
href="./visudet.html#collapsing-margins">collapse</a>.
676+
href="box.html#collapsing-margins">collapse</a>.
722677

723678
<!-- Add a statement/link here about bottom-up height calc? -IJ -->
724679

@@ -954,7 +909,7 @@ explicitly.
954909
positioning boxes on the same lines as the float. The outer edge of a
955910
float becomes the current edge for flowed or floated boxes to the left
956911
or right side. The margins of floating boxes never <a
957-
href="visudet.html#collapsing-margins">collapse</a> with margins of
912+
href="box.html#collapsing-margins">collapse</a> with margins of
958913
adjacent boxes.
959914

960915
<P>The values of this property have the following meanings:</p>
@@ -1017,7 +972,7 @@ The following HTML source:
1017972

1018973
<P>Note that the margin of the P element encloses the floating
1019974
IMG element and that the vertical margins do not
1020-
<a href="./visudet.html#collapsing-margins">collapse</a>.
975+
<a href="box.html#collapsing-margins">collapse</a>.
1021976
</div>
1022977

1023978
<H3>Controlling flow next to floats</H3>
@@ -1070,9 +1025,52 @@ the element in the <a href="conform.html#doctree">document tree</a>
10701025
that generated B.
10711026
</ul>
10721027

1073-
<P>Please consult the section on <a
1074-
href="visudet.html#floating-constraints">floating constraints</a> for
1075-
additional constraints.
1028+
<P>Furthermore:</p>
1029+
1030+
<OL>
1031+
<LI> The left <a href="box.html#outer-edge">outer edge</a> of a
1032+
left-floating box may not be to the left of the left edge of its <a
1033+
href="visuren.html#containing-block">containing block</a>. Analogous rules hold
1034+
for right-floating elements.
1035+
1036+
<LI> The left <a href="box.html#outer-edge">outer edge</a> of a
1037+
left-floating box must be to the right of the right <a
1038+
href="box.html#outer-edge">outer edge</a> of every <a
1039+
href="visuren.html#preceding-box">preceding</a> left-floating box or the
1040+
top of the former must be lower than the bottom of the
1041+
latter. Analogous rules hold for right-floating boxes.
1042+
1043+
<LI>The right <a href="box.html#outer-edge">outer edge</a> of a
1044+
left-floating box may not be to the right of the left <a
1045+
href="box.html#outer-edge">outer edge</a> of any right-floating
1046+
box that is to the right of it. Analogous rules hold for
1047+
right-floating elements.
1048+
1049+
<LI>A floating box's <a href="box.html#outer-edge">outer top</a>
1050+
may not be higher than the top of its <a
1051+
href="visuren.html#containing-block">containing block</a>.
1052+
1053+
<LI> The <a href="box.html#outer-edge">outer top</a> of an
1054+
element's floating box may not be higher than the outer top of any <a
1055+
href="visuren.html#block-box">block</a> or <a
1056+
href="visuren.html#floats">floated</a> box generated by a <a
1057+
href="conform.html#preceding">preceding</a> element.
1058+
1059+
<LI>The <a href="box.html#outer-edge">outer top</a> of an
1060+
element's floating box may not be higher than the top of any <span
1061+
class="index-inst" title="line-box"><a
1062+
href="visuren.html#line-box">line-box</a></span> containing a box
1063+
generated by a <a href="conform.html#preceding">preceding</a> element.
1064+
1065+
<LI> A floating box must be placed as high as possible.
1066+
1067+
<LI> A left-floating box must be put as far to the left as
1068+
possible, a right-floating box as far to the right as possible. A
1069+
higher position is preferred over one that is further to the
1070+
left/right.
1071+
</OL>
1072+
1073+
<!-- Please verify use of preceding or preceding box here. -IJ -->
10761074

10771075

10781076
<H2><a name="absolute-positioning">Absolute positioning</a></H2>
@@ -1104,7 +1102,7 @@ established by the <a href="#viewport">viewport</A>.
11041102
<P>For <a href="media.html#continuous-media-group">continuous
11051103
media</a>, fixed boxes do not move when the document is scrolled. In
11061104
this respect, they are similar to <a
1107-
href="./colors.html#background-properties">fixed background
1105+
href="colors.html#background-properties">fixed background
11081106
images</a>.
11091107

11101108
<P>For <a href="page.html">paged media</a>, boxes with fixed

0 commit comments

Comments
 (0)