Skip to content

Commit 8129e8c

Browse files
committed
[css2] Tantek's edits after Oslo ftf
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%402145
1 parent 66f0aff commit 8129e8c

1 file changed

Lines changed: 27 additions & 49 deletions

File tree

css2/visudet.src

Lines changed: 27 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
22
<html lang="en">
3-
<!-- $Id: visudet.src,v 2.78 2003-08-26 10:00:27 bbos Exp $ -->
3+
<!-- $Id: visudet.src,v 2.79 2003-08-27 12:23:16 bbos Exp $ -->
44
<head>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<title>Visual formatting model details</title>
7-
<!-- Changed by: Tantek Celik, 2003-08-24 -->
7+
<!-- Changed by: Tantek Celik, 2003-08-27 -->
88
<style type="text/css">
99
.current,.proposed,span.delcurrent,div.delcurrent { background:#feb }
1010
ins.proposed,span.insproposed,li.insproposed,div.insproposed { background:#bfb }
@@ -21,7 +21,7 @@ body>del,body>ins {display:block}
2121
block"</a></h2>
2222

2323
<p>The position and size of an element's box(es) are sometimes
24-
calculated relative to a certain <span class="delcurrent">rectangle</span><span class="insproposed">ancestor</span>, called the <dfn><span
24+
calculated relative to a certain rectangle, called the <dfn><span
2525
class="index-def" title="containing block">containing
2626
block</span></dfn> of the element. The containing block of an element
2727
is defined as follows:</p>
@@ -36,7 +36,7 @@ title="initial containing block|containing block::initial">initial
3636
containing block</span></dfn>.
3737
</li>
3838
<li>For other elements, if the element's position is 'relative' or 'static',
39-
the containing block is formed by <span class="delproposed">the content edge of</span> the nearest
39+
the containing block is formed by the content edge of the nearest
4040
<a href="visuren.html#block-level">block-level</a>, table cell or
4141
inline-block ancestor box.
4242
</li>
@@ -46,8 +46,7 @@ established by the <a href="visuren.html#viewport">viewport</a>.
4646
<li>If the element has 'position: absolute', the containing block is
4747
established by the nearest ancestor with a <span
4848
class="propinst-position">'position'</span> of 'absolute', 'relative'
49-
or 'fixed'<span class="delcurrent">, in the following way:</span><span class="insproposed">.</span>
50-
<div class="delcurrent">
49+
or 'fixed', in the following way:
5150
<ol>
5251
<li>In the case that the ancestor is <a
5352
href="visuren.html#block-level">block-level</a>, the containing block
@@ -72,21 +71,7 @@ are the bottom and left content edges of the last box of the ancestor.
7271
</ol>
7372
</li>
7473
</ol>
75-
</div>
76-
<div class="insproposed">
77-
If that ancestor is inline-level, construct its effective containing block
78-
content/padding boxes as following:
79-
<ol>
80-
<li>If the <span class="propinst-direction">'direction'</span> is 'ltr', for the top and left, use the the top and left content edges of the first box generated by
81-
the ancestor, and for the bottom and right are the bottom and right
82-
content edges of the last box of the ancestor.
83-
</li>
84-
<li>If the <span class="propinst-direction">'direction'</span> is 'rtl', for the top and right, use the top and
85-
right edges of the first box generated by the
86-
ancestor, and for the bottom and left, use the bottom and left content edges of the last box of the ancestor.
87-
</li>
88-
</ol>
89-
</div>
74+
9075
<p>If there is no such ancestor, the containing block is the initial
9176
containing block.
9277
</p>
@@ -97,10 +82,10 @@ containing block.
9782
<p>In paged media, an absolutely positioned element is positioned
9883
relative to its containing block ignoring any page breaks (as if the
9984
document were continuous). The element may subsequently be broken over
100-
several pages. (Page break properties apply.)
85+
several pages. Page break properties may apply, however if more than one block formatting context on a page attempts to break the page, the results (e.g. where the page is broken, if at all) are undefined.
10186
</p>
10287
<p class="note">Note that a
103-
containing block that is split over several pages may have a different
88+
block-level element that is split over several pages may have a different
10489
width on each page and that there may be device-specific limits.
10590
</p>
10691
</ins>
@@ -213,9 +198,14 @@ user agent if the value of this property is different than 'auto'.
213198
<dd>Specifies a percentage width. The percentage is calculated
214199
with respect to the width of the generated box's
215200
<a href="visuren.html#containing-block">containing block</a>.
216-
If the containing block's width depends on its content's width, and
217-
the current element is not absolutely positioned, then the resulting
218-
layout is undefined in CSS&nbsp;2.1.
201+
If the containing block is intrinsically sized (i.e., it depends on
202+
its content's width) and the current element is not absolutely
203+
positioned, then a percentage <span class="delcurrent">is</span><span class="insproposed">may be</span> interpreted as 'auto'.
204+
<span class="insproposed">
205+
<span class="note">
206+
Note: For absolutely positioned elements whose containing block is based on a block-level element, the percentage is calculated with respect to the width of the <em>padding box</em> of that element. This is a change from CSS1, where the percentage width was always calculated with respect to the <em>content box</em> of the parent element.
207+
</span>
208+
</span>
219209
</dd>
220210
<dt><strong>auto</strong>
221211
</dt>
@@ -415,7 +405,7 @@ elements is:</p>
415405
<blockquote>
416406
<p>'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width'
417407
+ 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width
418-
<span class="insproposed">of <em>padding</em> box</span> of containing block </p>
408+
of containing block </p>
419409
</blockquote>
420410

421411
<p>If all three of 'left', 'width', and 'right' are 'auto': First set
@@ -774,10 +764,7 @@ flow</h3>
774764
class="propinst-margin-top">'margin-top'</span>, or <span
775765
class="propinst-margin-bottom">'margin-bottom'</span> are 'auto',
776766
their used value is 0. If <span
777-
class="propinst-height">'height'</span> is 'auto' and 'overflow' is
778-
other than 'visible', use the rules in <a href="#flow-root-height">"auto
779-
height..."</a>. Otherwise if 'height' is 'auto' and 'overflow' is
780-
'visible', the height depends
767+
class="propinst-height">'height'</span> is 'auto', the height depends
781768
on whether the element has any block-level children and whether it has
782769
padding or borders:
783770
</p>
@@ -792,7 +779,8 @@ it has block-level children, the height is the distance between the
792779
top border-edge of the topmost block-level child box and the bottom
793780
border-edge of the bottommost block-level child box.
794781
</p>
795-
</del> <ins class="proposed"
782+
</del>
783+
<ins class="proposed"
796784
cite="http://lists.w3.org/Archives/Member/w3c-css-wg/2003AprJun/0347.html">If
797785
it has block-level children, the height is the distance between the
798786
top border-edge of the topmost block-level child box that doesn't have
@@ -838,7 +826,7 @@ dimensions must satisfy this constraint:</p>
838826
<blockquote>
839827
<p>'top' + 'margin-top' + 'border-top-width' + 'padding-top' + 'height'
840828
+ 'padding-bottom' + 'border-bottom-width' + 'margin-bottom' + 'bottom'
841-
= height <span class="insproposed">of <em>padding</em> box</span> of containing block </p>
829+
= height of containing block </p>
842830
</blockquote>
843831

844832
<p>If all three of 'top', 'height', and 'bottom' are auto, set 'top'
@@ -856,17 +844,15 @@ applies.</p>
856844

857845
<ol>
858846
<li>'top' and 'height' are 'auto' and 'bottom' is not 'auto', then the
859-
height is based on the content (see <a href="#flow-root-height">"auto
860-
height..."</a>), set 'auto' values for 'margin-top' and
847+
height is based on the content, set 'auto' values for 'margin-top' and
861848
'margin-bottom' to 0, and solve for 'top'</li>
862849

863850
<li>'top' and 'bottom' are 'auto' and 'height' is not 'auto', then
864851
set 'top' to the static position, set 'auto' values for 'margin-top'
865852
and 'margin-bottom' to 0, and solve for 'bottom'</li>
866853

867854
<li>'height' and 'bottom' are 'auto' and 'top' is not 'auto', then the
868-
height is based on the content (see <a href="#flow-root-height">"auto
869-
height..."</a>), set 'auto' values for 'margin-top' and
855+
height is based on the content, set 'auto' values for 'margin-top' and
870856
'margin-bottom' to 0, and solve for 'bottom'</li>
871857

872858
<li>'top' is 'auto', 'height' and 'bottom' are not 'auto', then set
@@ -927,16 +913,9 @@ value.
927913
class="propinst-margin-bottom">'margin-bottom'</span> are 'auto',
928914
their used value is 0. If <span
929915
class="propinst-height">'height'</span> is 'auto', the height depends
930-
on the element's descendants, see <a href="#flow-root-height">the next
931-
section.</a>
916+
on the element's descendants:
932917
</p>
933-
934-
935-
<h3><a name="flow-root-height">'Auto' height for elements establishing
936-
block formatting contexts</a></h3>
937-
938-
<p>If the element only has inline-level children, the height is the
939-
distance
918+
<p>If it only has inline-level children, the height is the distance
940919
between the top of the topmost line box and the bottom of the
941920
bottommost line box.
942921
</p>
@@ -950,15 +929,14 @@ positioned boxes are considered without their offset. Note that the
950929
child box may be an <a
951930
href="visuren.html#anonymous-block-level">anonymous block box.</a>
952931
</p>
953-
<p>In addition, if the element has any floating descendants whose
954-
bottom margin
932+
<p>In addition, if the element has any floating descendants whose top
933+
margin edge is above the top established above or whose bottom margin
955934
edge is below the bottom, then the height is increased to include
956935
those edges. Only floats that are children of the element itself or of
957936
descendants in the normal flow are taken into account, i.e., floats
958937
inside absolutely positioned descendants are not.
959938
</p>
960939

961-
962940
<h2><a name="min-max-heights">Minimum and maximum heights</a>: <span
963941
class="propinst-min-height">'min-height'</span> and <span
964942
class="propinst-max-height">'max-height'</span></h2>

0 commit comments

Comments
 (0)