Skip to content

Commit a3c7617

Browse files
committed
[css2] Make line-height match implementations for values other than normal
Closes w3c#1801
1 parent c2a93bf commit a3c7617

2 files changed

Lines changed: 18 additions & 16 deletions

File tree

css2/visudet.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,20 +1419,21 @@ <h3>10.8.1 <a name="leading">Leading and half-leading</a></h3>
14191419
href="#strut">strut</a> (an invisible glyph of zero width) with the
14201420
<var>A</var> and <var>D</var> of the element's first available font.
14211421

1422-
<p>Still for each glyph, determine the leading <var>L</var> to add,
1422+
<p>When the value of the <a href="" class="noxref"><span class="propinst-line-heigh">'line-height'</span></a> property
1423+
is something other than 'normal',
1424+
determine the leading <var>L</var> to add,
14231425
where <var>L</var> = <a href="visudet.html#propdef-line-height" class="noxref"><span
1424-
class="propinst-line-height">'line-height'</span></a> - <var>AD</var>. Half
1425-
the leading is added above <var>A</var> and the other half below
1426-
<var>D</var>, giving the glyph and its leading a total height above
1426+
class="propinst-line-height">'line-height'</span></a> - <var>AD</var> of the first available font.
1427+
Half the leading is added above <var>A</var> and the other half below
1428+
<var>D</var>, giving a total height above
14271429
the baseline of <var>A'</var> = <var>A</var> + <var>L</var>/2 and a
14281430
total depth of <var>D'</var> = <var>D</var> + <var>L</var>/2.
1431+
Glyphs from fonts other than the first available font
1432+
do not impact the height or baseline of the inline box.
14291433

14301434
<p class=note><strong>Note.</strong> <var>L</var> may be negative.
14311435

1432-
<p id="inline-box-height">The height of the inline box encloses all
1433-
glyphs and their half-leading on each side and is thus exactly
1434-
'line-height'. Boxes of
1435-
child elements do not influence this height.
1436+
<p id="inline-box-height">Boxes of child elements do not influence this height.
14361437

14371438
<p>Although margins, borders, and padding of non-replaced elements do
14381439
not enter into the line box calculation, they are still rendered

css2/visudet.src

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,20 +1323,21 @@ contains no glyphs at all, it is considered to contain a <a
13231323
href="#strut">strut</a> (an invisible glyph of zero width) with the
13241324
<var>A</var> and <var>D</var> of the element's first available font.
13251325

1326-
<p>Still for each glyph, determine the leading <var>L</var> to add,
1326+
<p>When the value of the <span class="propinst-line-heigh">'line-height'</span> property
1327+
is something other than 'normal',
1328+
determine the leading <var>L</var> to add,
13271329
where <var>L</var> = <span
1328-
class="propinst-line-height">'line-height'</span> - <var>AD</var>. Half
1329-
the leading is added above <var>A</var> and the other half below
1330-
<var>D</var>, giving the glyph and its leading a total height above
1330+
class="propinst-line-height">'line-height'</span> - <var>AD</var> of the first available font.
1331+
Half the leading is added above <var>A</var> and the other half below
1332+
<var>D</var>, giving a total height above
13311333
the baseline of <var>A'</var> = <var>A</var> + <var>L</var>/2 and a
13321334
total depth of <var>D'</var> = <var>D</var> + <var>L</var>/2.
1335+
Glyphs from fonts other than the first available font
1336+
do not impact the height or baseline of the inline box.
13331337

13341338
<p class=note><strong>Note.</strong> <var>L</var> may be negative.
13351339

1336-
<p id="inline-box-height">The height of the inline box encloses all
1337-
glyphs and their half-leading on each side and is thus exactly
1338-
'line-height'. Boxes of
1339-
child elements do not influence this height.
1340+
<p id="inline-box-height">Boxes of child elements do not influence this height.
13401341

13411342
<p>Although margins, borders, and padding of non-replaced elements do
13421343
not enter into the line box calculation, they are still rendered

0 commit comments

Comments
 (0)