@@ -329,95 +329,62 @@ Line Sizing Containment: the 'line-sizing' property
329
329
330
330
331
331
Name : line-sizing
332
- Value : quirks-behavior | current-behavior | better-behavior | box-model-behavior | absolute-behavior
333
- Initial : current-behavior
334
- Applies to : block containers? inline boxes?
332
+ Value : legacy | normal
333
+ Initial : legacy
334
+ Applies to : inline boxes
335
335
Inherited : yes
336
336
Percentages : N/A
337
337
Computed value : the specified keyword
338
338
339
339
340
340
ISSUE: This is a rought draft of a proposal, and has not yet been approved by the CSSWG.
341
- Many variants have been included to promote discussion of possible behaviors;
342
- not all of them are expected to be kept.
343
341
344
- Also all the keywords are expected to be renamed.
345
342
346
343
This property controls the method by which line boxes are sized,
347
344
and thus the spacing between lines of text.
348
345
349
346
Values have the following meanings:
350
347
351
348
352
- quirks-behavior
349
+ legacy
353
350
354
- Line boxes are sized, and content positioned within them,
355
- as defined in [[!CSS2]] except that
351
+ The inline box contributes to the sizing of its line box
352
+ based on its 'line-height' ,
353
+ rather than based on its box edges,
354
+ as defined in [[!CSS2]] .
355
+ In Quirks Mode [[!QUIRKS]] ,
356
356
357
357
that has zero borders and padding and
358
358
that does not directly contain text or
preserved white space [[!CSS-TEXT-3]]
359
- is ignored for this purpose.
360
-
361
- current-behavior
362
-
363
- Line boxes are sized, and content positioned within them,
364
- as defined in [[!CSS2]] .
359
+ is ignored when sizing the line box.
365
360
366
361
Note: In this model, vertical rhythm is broken
367
362
any time there is a change in font metrics within a paragraph.
368
363
369
- better-behavior
364
+ normal
370
365
371
- Line boxes are sized, and content positioned within them,
372
- as defined in [[!CSS2]] ,
373
- except that positive half-leading is not applied
374
- to any box other than the
root inline box .
366
+ The inline box contributes to the sizing of its line box
367
+
368
+ rather than its 'line-height' .
369
+ Half-leading is inserted inside the
content box edges,
370
+ rather than overlapping the padding/border/margin areas.
371
+ However, positive half-leading is only applied to the
root inline box .
372
+ Negative half-leading is applied to all inline boxes,-
373
+ reducing the size of the
content box as needed.
375
374
376
375
Note: This will give consistent line spacing
377
376
as long as there is some amount of leading added,
378
377
such that the half-leading on the root inline
379
- is large enough to accommodate the unleaded ascent of its descendants.
380
- The line box will grow to accommodate
378
+ is large enough to accommodate the unleaded ascent/descent of its descendants.
379
+ The line box will grow, however, to accommodate
381
380
content that would otherwise overflow,
382
- avoiding overlap between lines.
383
-
384
- box-model-behavior
385
-
386
- Line boxes are sized to fit the
root inline box
387
-
388
-
389
-
390
- Positive half-leading is not applied to any other
inline box ;
391
- negative half-leading is applied as negative margins
392
- to
inline boxes whose block-axis margins, borders, and padding
393
- are zero.
394
-
395
- Note: This mode is similar to ''better-behavior'' ,
396
- but re-uses the familiar margin/border/padding box model
397
- of controlling spacing.
398
- However to ensure that 'line-height' < 1 behaves as expected,
399
- the default case (no margin/border/padding)
400
- needs to apply negative leading to such inlines.
401
-
402
- absolute-behavior
403
-
404
- Line boxes are sized to fit the
root inline box
405
-
406
- no other boxes are considered.
407
- Inline-level content may overflow the line box
408
- and overlap adjacent lines
409
- if it extends higher or lower
410
- than the edges of the root inline box’s leading.
381
+ to avoid overlap between lines.
411
382
412
383
413
384
ISSUE: Should this property apply to block containers or to inline boxes?
414
385
In the latter case, an individual inline could say "pay attention to me"
415
386
or "don't pay attention to me".
416
387
417
- ISSUE: Need better names. Maybe `loose | normal | strict | absolute`?
418
- Maybe `quirks | legacy | normal | absolute`?
419
- Something else?
420
-
421
388
422
389
Drawing Inline Boxes
423
390
@@ -451,10 +418,11 @@ Inline Box Heights: the 'inline-sizing' property
451
418
452
419
stretch
453
420
454
-
421
+ Once the line box has been sized,
422
+
455
423
is calculated as the
stretch fit
456
- into the line box.
457
- The box is
then positioned such that its
margin edges
424
+ into the line box,
425
+ and it is positioned such that its
margin edges
458
426
coincide with the line box’s edges.
459
427
460
428
@@ -1841,13 +1809,23 @@ A.2: Synthesizing Baselines for Replaced Content
1841
1809
1842
1810
Changes
1843
1811
1812
+ Changes since the
1813
+
1814
+ include:
1815
+
1816
+
1817
+
1818
+ Added 'line-sizing' property to control how inter-line spacing is calculated.
1819
+
1820
+
1821
+
1844
1822
Changes since the
1845
1823
1846
1824
include:
1847
1825
1848
1826
1849
1827
1850
- Added outline of property to control the logical height of inline boxes.
1828
+ Sketched out property to control the logical height of inline boxes.
1851
1829
1852
1830
1853
1831
Better defined handling of initial letters
0 commit comments