Skip to content

Commit d1ef474

Browse files
committed
[css2] Some more stuff from personal notes
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%40631
1 parent 11fabbb commit d1ef474

1 file changed

Lines changed: 36 additions & 23 deletions

File tree

css2/visudet.src

Lines changed: 36 additions & 23 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: visudet.src,v 1.39 1998-01-13 14:07:57 ijacobs Exp $ -->
3+
<!-- $Id: visudet.src,v 1.40 1998-01-13 14:35:01 ijacobs Exp $ -->
44
<HEAD>
55
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
66
<TITLE>Visual rendering model details</TITLE>
@@ -1005,19 +1005,32 @@ class="propinst-min-height">'min-height'</span>.
10051005
margin|margin::horizontal">horizontal margins</span> never collapse.
10061006

10071007
<P><span class="index-inst" title="vertical margin|margin::vertical">
1008-
Vertical margins</span> may collapse. Two or more adjoining vertical
1009-
margins (i.e., with no border, padding, or content between them) are
1010-
collapsed to use the maximum of the margin values. In most cases,
1011-
after collapsing the vertical margins, the result is visually more
1012-
pleasing and closer to what the designer expects. Please consult the
1013-
<a href="./visuren.html#mpb-examples">examples of margin, padding, and
1014-
borders</a> for an illustration of collapsed margins.
1015-
1016-
<P> In the case of negative margins, the absolute maximum of the
1008+
Vertical margins</span> may collapse for certain types of boxes:
1009+
1010+
<ul>
1011+
<li>Two or more adjoining vertical margins
1012+
(i.e., with no border, padding, or content between them)
1013+
of <a
1014+
href="visuren.html#block-level">block-level</a> boxes in
1015+
the normal flow collapse. The resulting margin width
1016+
is the maximum of the adjoining margin widths.
1017+
In the case of negative margins, the absolute maximum of the
10171018
negative adjoining margins is deducted from the maximum of the
10181019
positive adjoining margins. If there are no positive margins, the
10191020
absolute maximum of the negative adjoining margins is deducted from
10201021
zero.
1022+
<li>Vertical margins between a <a
1023+
href="visuren.html#floats">floating</a>
1024+
box and another box do not collapse.
1025+
<li>Vertical margins between an <a
1026+
href="visuren.html#absolute-positioning">absolutely positioned</a>
1027+
boxes do not collapse.
1028+
</ul>
1029+
1030+
<P>In most cases, after collapsing the vertical margins, the result is
1031+
visually more pleasing and closer to what the designer expects. Please
1032+
consult the <a href="./visuren.html#mpb-examples">examples of margin,
1033+
padding, and borders</a> for an illustration of collapsed margins.
10211034

10221035
<H2><a name="line-height">Line height calculations</a>: the <span
10231036
class="propinst-line-height">'line-height'</span> and <span
@@ -1032,7 +1045,8 @@ width is confined by a <a href="#containing-block">containing
10321045
block</a> and whose height is the greater of:
10331046

10341047
<ol>
1035-
<li>The maximum height of the boxes flowed into the line box.
1048+
<li>The maximum height of the <a href="visuren.html#padding-edge">
1049+
padding edge</a> of boxes flowed into the line box.
10361050
Note that several inline elements may generate boxes in the same line
10371051
box.
10381052
<li>The <span class="propinst-line-height">'line-height'</span>
@@ -1049,7 +1063,7 @@ height if the top of the <a href="visuren.html#outer-edge">outer
10491063
edge</a> is above the tallest box in the line or if the bottom is
10501064
below the lowest.
10511065

1052-
<H3>Leading</h3>
1066+
<H3>Leading and half-leading</h3>
10531067

10541068
<P>Note that a box (e.g., containing text) may not be as tall as the
10551069
line box that contains it; user agents may add space above and below
@@ -1074,20 +1088,19 @@ class="propinst-vertical-align">'vertical-align'</span> property.
10741088

10751089
<!-- How does shifting change the line box height ? -IJ -->
10761090

1077-
<P>Top and bottom margins, border, and padding heights specified for
1078-
<a href="visuren.html#inline">inline</a> elements do <em>not</em>
1091+
<P>Top and bottom margin and border heights specified for <a
1092+
href="visuren.html#inline">inline</a> elements do <em>not</em>
10791093
influence the calculation of line box heights. Furthermore, line boxes
1080-
are stacked with no intervening space (i.e., margins, borders, and
1081-
padding do not affect vertical separation). Margins, borders, and
1082-
padding do apply for colors and backgrounds. Note that if the height
1094+
are stacked with no intervening space (i.e., margins and borders
1095+
do not affect their vertical separation). Margins and borders
1096+
do apply for colors and backgrounds. Note that if the height
10831097
of a line box is greater than the <a
10841098
href="visuren.html#outer-edge">outer edges</a> of the boxes it
10851099
contains, backgrounds and colors do not "leak" outside the line
10861100
box. However, if the <a href="visuren.html#outer-edge">outer edges</a>
1087-
exceed the height of the line box, colors and backgrounds will
1088-
"bleed" into adjacent line boxes.
1089-
<!-- What background should be used if line box height exceeds
1090-
content + padding + border + margin height? -IJ -->
1101+
exceed the height of the line box, colors and backgrounds will "bleed"
1102+
into adjacent line boxes. <!-- What background should be used if line
1103+
box height exceeds content + padding + border + margin height? -IJ -->
10911104

10921105
<!-- How can this be true if the line box height is
10931106
the maximum of the line-height and the required height? -->
@@ -1158,7 +1171,7 @@ by the value of the element's <span
11581171
class="propinst-line-height">'line-height'</span> property.
11591172
Percentages raise the baseline of the element (or the bottom,
11601173
if it has no baseline) the specified amount above the baseline of the
1161-
parent. Negative values are possible, e.g., a value of '-100%' will
1174+
parent. Negative values are legal. For example, a value of '-100%' will
11621175
lower the element so that the baseline of the element ends up where
11631176
the baseline of the next line should have been. This allows precise
11641177
control over the vertical position of elements (such as images that
@@ -1178,7 +1191,7 @@ The three rules in the example below have the same resultant line height:
11781191

11791192
<!-- #include src=properties/vertical-align.srb -->
11801193

1181-
<P>This property affects the vertical positioning in a line box of
1194+
<P>This property affects the vertical positioning inside a line box of
11821195
boxes generated by an element. The following values only have meaning
11831196
with respect to a parent inline element; they have no effect if no
11841197
parent exists:</P>

0 commit comments

Comments
 (0)