@@ -7725,7 +7725,7 @@ <h3>9.2.3 <a name="run-in">Run-in boxes</a></h3>
77257725 <li>Let <var>B</var> be the first of <var>A</var>'s following <a
77267726 href="conform.html#sibling">siblings</a> that is neither floating
77277727 nor <a href="visuren.html#absolutely-positioned">absolutely
7728- positioned nor has 'display: none'. If <var>B</var> exists and has a
7728+ positioned</a> nor has 'display: none'. If <var>B</var> exists and has a
77297729 specified value for 'display' of 'block' or 'list-item' and is not
77307730 <a href="conform.html#replaced-element">replaced,</a> then
77317731 <var>A</var> is rendered as an 'inline' element at the start of
@@ -9470,25 +9470,28 @@ <h3>9.9.1 <a name="z-index">Specifying the stack level</a>: the <a href="visuren
94709470
94719471<p>For a positioned box, the <a href="visuren.html#propdef-z-index" class="noxref"><span
94729472class="propinst-z-index">'z-index'</span></a> property specifies:
9473- </p>
9473+
94749474<ol>
9475- <li>The stack level of the box in the current stacking context.</li>
9476- <li>Whether the box establishes a local stacking context.</li>
9475+ <li>The stack level of the box in the current stacking context.
9476+
9477+ <li>Whether the box establishes a stacking context.
94779478</ol>
94789479
9479- <p>Values have the following meanings:</p>
9480+ <p>Values have the following meanings:
94809481
94819482<dl>
9482- <dt><span class="index-inst" title="<integer>"><a name="x35" href="syndata.html#value-def-integer" class="noxref"><span
9483- class="value-inst-integer"><strong><integer></strong></span></a></span></dt>
9484- <dd>This integer is the stack level of the generated box
9485- in the current stacking context. The box
9486- also establishes a local stacking context in which its stack
9487- level is '0'.</dd>
9488- <dt><strong>auto</strong></dt>
9489- <dd>The stack level of the generated box in the current stacking
9490- context is the same as its parent's box. The
9491- box does not establish a new local stacking context.</dd>
9483+ <dt><span class="index-inst" title="<integer>"><a name="x35" href="syndata.html#value-def-integer" class="noxref"><span
9484+ class="value-inst-integer"><strong><integer></strong></span></a></span>
9485+
9486+ <dd>This integer is the stack level of the generated box in the
9487+ current stacking context. The box also establishes a new stacking
9488+ context.
9489+
9490+ <dt><strong>auto</strong>
9491+
9492+ <dd>The stack level of the generated box in the current stacking
9493+ context is '0'. The box does not establish a new stacking context
9494+ unless it is the root element.
94929495</dl>
94939496
94949497<p><em>In this section, the expression "in front of"
@@ -9508,11 +9511,12 @@ <h3>9.9.1 <a name="z-index">Specifying the stack level</a>: the <a href="visuren
95089511stacking contexts may not come between any of its boxes.
95099512</p>
95109513<p>Each box belongs to one <a name="x36"><span class="index-def" title="stacking
9511- context"><dfn>stacking context</dfn></span></a>. Each box in a given
9512- stacking context has an integer <span class="index-def" title="stack
9513- level"><a name="stack-level"><dfn>stack level</dfn></a></span>, which
9514- is its position on the z-axis relative to other boxes in the same
9515- stacking context. Boxes with greater stack levels are always formatted
9514+ context"><dfn>stacking context</dfn></span></a>. Each positioned box in a
9515+ given stacking context has an integer <span class="index-def"
9516+ title="stack level"><a name="stack-level"><dfn>stack
9517+ level</dfn></a></span>, which is its position on the z-axis relative
9518+ other stack levels within the same stacking context. Boxes with
9519+ greater stack levels are always formatted
95169520in front of boxes with lower stack levels. Boxes may have negative
95179521stack levels. Boxes with the same stack level in a stacking context
95189522are stacked back-to-front according to document tree order.
@@ -9528,33 +9532,41 @@ <h3>9.9.1 <a name="z-index">Specifying the stack level</a>: the <a href="visuren
95289532href="http://www.w3.org/TR/css3-color/#transparency">opacity</a>'
95299533<a href="refs.html#ref-CSS3COLOR" rel="biblioentry" class="noxref"><span class="informref">[CSS3COLOR]</span></a>.
95309534</p>
9531- <p>
9532- Each stacking context consists of the following
9533- stacking levels (from back to front):
9534- </p>
9535+
9536+ <p>Within each stacking context, the following layers are painted in
9537+ back-to- front order.
9538+
95359539<ol>
9536- <li>the background and borders of the element forming the stacking context.</li>
9537- <li>the stacking contexts of descendants with negative stack
9538- levels.</li>
9539- <li>a stacking level containing in-flow non-inline-level
9540- non-positioned descendants.</li>
9541- <li>a stacking level for non-positioned floats and their contents.</li>
9542- <li>a stacking level for in-flow inline-level non-positioned descendants.</li>
9543- <li>a stacking level for positioned descendants with 'z-index:
9544- auto', and any descendant stacking contexts with 'z-index: 0'.</li>
9545- <li>the stacking contexts of descendants with positive stack levels.</li>
9540+ <li>the background and borders of the element forming the stacking
9541+ context.
9542+
9543+ <li>the child stacking contexts with negative stack levels (most
9544+ negative first).
9545+
9546+ <li>the in-flow, non-inline-level, non-positioned descendants.
9547+
9548+ <li>the floating descendants.
9549+
9550+ <li>the in-flow, inline-level, non-positioned descendants, including
9551+ inline tables and inline blocks.
9552+
9553+ <li>the stacking contexts with stack level 0, and the positioned
9554+ descendants with 'z-index: auto'.
9555+
9556+ <li>the child stacking contexts with positive stack levels (least
9557+ positive first).
95469558</ol>
9547- <p>
9548- For a more thorough explanation of the stacking order, please see <a href="zindex.html">Appendix E</a>.
9549- </p>
9550- <p>
9551- The contents of inline blocks and inline tables are stacked as if
9552- they generated new stacking contexts, except that any positioned
9553- elements and any elements that
9554- actually create new stacking contexts take part in the parent
9555- stacking context. They are then painted atomically in the inline
9556- stacking level.
9557- </p >
9559+
9560+ <p>Positioned elements with 'z-index: auto' (in layer 6), floats
9561+ (layer 4), inline blocks (layer 5), and inline tables
9562+ (layer 5), are painted as if those elements generated new
9563+ stacking contexts, except that their positioned descendants and any
9564+ child stacking contexts take part in the current stacking context.
9565+
9566+ <p>This painting order is applied recursively to each stacking
9567+ context. This description of stacking context painting order
9568+ constitutes an overview of the detailed normative definition in
9569+ <a href="zindex.html">Appendix E.</a >
95589570
95599571<div class="html-example">
95609572<p>In the following example, the stack levels of
@@ -11283,15 +11295,19 @@ <h2>10.8 <a name="line-height">Line height calculations</a>: the <a href="visude
1128311295</li>
1128411296<li>The inline boxes are aligned vertically according
1128511297to their <a href="visudet.html#propdef-vertical-align" class="noxref"><span class="propinst-vertical-align">'vertical-align'</span></a>
11286- property.
11298+ property.
11299+
11300+ In case they are aligned 'top' or 'bottom', they must be aligned so as
11301+ to minimize the line box height. If such boxes are tall enough, there
11302+ are multiple solutions and CSS 2.1 does not define the position
11303+ of the line box's baseline (i.e., the position of the <a
11304+ href="#strut">strut, see below</a>).
1128711305</li>
1128811306<li>The line box height is the distance between the uppermost
11289- box top and the lowermost box bottom.
11307+ box top and the lowermost box bottom. (This includes the <a
11308+ href="#strut">strut,</a> as explained under <a href="visudet.html#propdef-line-height" class="noxref"><span
11309+ class="propinst-line-height">'line-height'</span></a> below.)
1129011310</li>
11291- <li>If the resulting height is smaller than the minimal height of line
11292- boxes for this block, as specified by the <a href="visudet.html#propdef-line-height" class="noxref"><span
11293- class=propinst-line-height>'line-height'</span></a> property, the height is
11294- increased to be that minimal height.</li>
1129511311</ol>
1129611312
1129711313<p>Empty inline elements generate empty inline boxes, but these boxes
@@ -11367,6 +11383,10 @@ <h3>10.8.1 <a name="leading">Leading and half-leading</a></h3>
1136711383block's font and line height properties (what T<sub>E</sub>X calls a
1136811384"strut").</a>
1136911385</p>
11386+ <p>The height and depth of the font above and below the baseline are
11387+ assumed to be metrics that are contained in the font. (For more
11388+ details, see CSS level 3.)
11389+
1137011390<p>On an <a
1137111391href="visuren.html#inline-level">inline-level</a> element, 'line-height'
1137211392specifies the height that is used in the calculation of the line box
@@ -24454,8 +24474,9 @@ <h2>E.2 <a name="painting-order">Painting order</a></h2>
2445424474 and contains the root element. Initially, the viewport is anchored
2445524475 with its top left corner at the canvas origin.
2445624476
24457- <p>The stacking order for an element generating a stacking context
24458- (see the 'z-index' property) is:
24477+ <p>The painting order for the descendants of an element generating
24478+ a stacking context (see the <a href="visuren.html#propdef-z-index" class="noxref"><span
24479+ class="propinst-z-index">'z-index'</span></a> property) is:
2445924480
2446024481 <ol class=stack>
2446124482 <li>
0 commit comments