|
1 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> |
2 | 2 | <html lang="en"> |
3 | | -<!-- $Id: visudet.src,v 2.137 2009-08-06 19:22:15 bbos Exp $ --> |
| 3 | +<!-- $Id: visudet.src,v 2.138 2009-08-31 17:36:35 bbos Exp $ --> |
4 | 4 | <head> |
5 | 5 | <title>Visual formatting model details</title> |
6 | 6 | <style type="text/css"> |
@@ -1304,6 +1304,46 @@ increased to be that minimal height.</li> |
1304 | 1304 | still have margins, padding, borders and a line height, and thus |
1305 | 1305 | influence these calculations just like elements with content. |
1306 | 1306 | </p> |
| 1307 | + |
| 1308 | +<!-- |
| 1309 | +<div class=example> |
| 1310 | +<p>For example, a block element with two inline children like this |
| 1311 | + |
| 1312 | +<pre><p><span>Fjord</span> <sup>super</sup></pre> |
| 1313 | + |
| 1314 | +<p>may consist of one line box whose height is calculated as shown in |
| 1315 | +the figure: |
| 1316 | + |
| 1317 | +<div class=figure> |
| 1318 | +<p><img src="images/linebox.png" alt="(diagram)" style="max-width: 100%"> |
| 1319 | +<p>A line box. See explanation in text. |
| 1320 | +</div> |
| 1321 | + |
| 1322 | +<p>The font and the 'line-height' property of the P determine the |
| 1323 | +minimum height of the line box: (1) = ascender of P's first available |
| 1324 | +font; (2) = descender of that font; (3) P's 'line-height' value. (As |
| 1325 | +explained in 10.6, CSS2 also allows a UA to use another measure of the font |
| 1326 | +instead of the ascender and descender. In that case (1) + (2) is |
| 1327 | +likely to be bigger than 1em.) The solid red parts are the half-leading. |
| 1328 | + |
| 1329 | +<p>Each glyph in the line box is placed relative to the line box's |
| 1330 | +baseline. Those in the SPAN have a 'vertical-align' value of |
| 1331 | +'baseline' and are thus placed on that baseline: (4) = the SPAN's |
| 1332 | +'line-height' value; (5) = the ascender of the letters in the SPAN; |
| 1333 | +(6) = their descender. |
| 1334 | + |
| 1335 | +<p>The SUP element has a non-zero 'vertical-align' (b) and thus all |
| 1336 | +letters and the half-leading at the top and bottom are shifted up to |
| 1337 | +a new baseline position: (7) = ascender of glyphs in SUP; (8) = |
| 1338 | +descender; (9) is 'line-height' of the SUP element. |
| 1339 | + |
| 1340 | +<p>The resulting line box (the grey box in the diagram) is tall enough |
| 1341 | +to enclose the tops and bottoms of all the contents. In this case, its |
| 1342 | +height (b) is larger than the line height of any individual part of |
| 1343 | +the line box. |
| 1344 | +</div> |
| 1345 | +--> |
| 1346 | + |
1307 | 1347 | <h3><a name="leading">Leading and half-leading</a></h3> |
1308 | 1348 |
|
1309 | 1349 | <p>Since the value of <span |
|
0 commit comments