Skip to content

Commit b302253

Browse files
committed
[css-inline-3] Apply css2 patch for 10.8
Based on Pull Request #1993 to solve issue #1796
1 parent 8dde186 commit b302253

1 file changed

Lines changed: 26 additions & 21 deletions

File tree

css-inline-3/Overview.bs

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -407,24 +407,38 @@ each other by their relevant baselines. Then, for
407407
each glyph, determine the <var>A</var> and <var>D</var>. Note that
408408
glyphs in a single element may come from different fonts and thus need
409409
not all have the same <var>A</var> and <var>D</var>. If the inline box
410-
contains no glyphs at all, it is considered to contain a <a
410+
contains no glyphs at all,
411+
or if it contains only glyphs from fallback fonts,
412+
it is considered to contain a <a
411413
href="#strut">strut</a> (an invisible glyph of zero width) with the
412414
<var>A</var> and <var>D</var> of the element's first available font.
413415

414-
<p>Still for each glyph, determine the leading <var>L</var> to add,
416+
<p id="inline-box-height">When the value of the <span class="propinst-line-heigh">'line-height'</span> property
417+
is something other than 'normal',
418+
determine the leading <var>L</var> to add,
415419
where <var>L</var> = <span
416-
class="propinst-line-height">'line-height'</span> - <var>AD</var>. Half
417-
the leading is added above <var>A</var> and the other half below
418-
<var>D</var>, giving the glyph and its leading a total height above
420+
class="propinst-line-height">'line-height'</span> - <var>AD</var> of the first available font.
421+
Half the leading is added above <var>A</var> of the first available font, and the other half below
422+
<var>D</var> of the first available font, giving a total height above
419423
the baseline of <var>A'</var> = <var>A</var> + <var>L</var>/2 and a
420424
total depth of <var>D'</var> = <var>D</var> + <var>L</var>/2.
425+
Glyphs from fonts other than the first available font
426+
do not impact the height or baseline of the inline box
427+
for <span class="propinst-line-heigh">'line-height'</span> values other than 'normal'.
421428

422429
<p class=note><strong>Note.</strong> <var>L</var> may be negative.
423430

424-
<p id="inline-box-height">The height of the inline box encloses all
425-
glyphs and their half-leading on each side and is thus exactly
426-
'line-height'. Boxes of
427-
child elements do not influence this height.
431+
<p>Boxes of child elements do not influence this height.
432+
433+
<p>When the value of the <span class="propinst-line-heigh">'line-height'</span> property
434+
is 'normal',
435+
the height of the inline box encloses all glyphs, going from the highest <var>A</var> to the deepest <var>D</var>.
436+
437+
<p>User Agents may use different sets of font metrics when determining <var>A</var> and <var>D</var>
438+
depending on whether the <span class="propinst-line-heigh">'line-height'</span> property
439+
is 'normal' or some other value,
440+
for instance taking external leading metrics into account
441+
only in the 'normal' case.
428442

429443
<p>Although margins, borders, and padding of non-replaced elements do
430444
not enter into the line box calculation, they are still rendered
@@ -474,13 +488,9 @@ height.
474488

475489
<dl>
476490
<dt><strong>normal</strong> </dt>
477-
<dd>Tells user agents to set the used
478-
value to a "reasonable" value based on the font of the element. The
479-
value has the same meaning as <span class="index-inst"
480-
title="&lt;number&gt;"><span
481-
class="value-inst-number">&lt;number&gt;</span></span>. We recommend a
482-
used value for 'normal' between 1.0 to 1.2. The <a
483-
href="cascade.html#computed-value">computed value</a> is 'normal'.
491+
<dd>Tells user agents to determine the height of the inline box
492+
automatically based on font metrics.
493+
See above for details.
484494
</dd>
485495
<dt><span class="index-inst" title="&lt;length&gt;"><span
486496
class="value-inst-length"><strong>&lt;length&gt;</strong></span></span>
@@ -515,11 +525,6 @@ div { line-height: 120%; font-size: 10pt } /* percentage */
515525
</pre>
516526
</div>
517527

518-
<p>When an element contains text that is rendered
519-
in more than one font, user agents may determine the 'normal' <span
520-
class="propinst-line-height">'line-height'</span> value according to
521-
the largest font size.
522-
</p>
523528
<p class=note><em><strong>Note.</strong> When there is only one value of <span
524529
class="propinst-line-height">'line-height'</span> (other than 'normal') for all inline
525530
boxes in a block container box and they all use the same first available font (and

0 commit comments

Comments
 (0)