@@ -450,22 +450,21 @@ Limiting Number of Visible Text Lines: the 'max-lines' property</h2>
450
450
remaining content is fragmented away
451
451
and neither rendered nor measured.
452
452
Specifically,
453
+ if the value of 'max-lines' is not <dfn for=max-lines type=value>none</dfn> :
453
454
454
455
<ul>
455
456
<li> The box becomes a <a>fragmentation container</a>
456
- that captures <a>region breaks</a> .
457
+ that captures <a>region breaks</a> ,
458
+ if it is not already.
459
+ [[!CSS-BREAK-3]]
457
460
458
- <li> A <a>region break</a> [[!CSS-BREAK-3]]
461
+ <li> A <a>region break</a>
459
462
is forced after its <var> N</var> th
460
463
descendant <a>in-flow</a> <a>line box</a> ,
461
464
where <var> N</var> is the specified value of 'max-lines' .
462
- For this purpose,
463
- line boxes are counted in
464
- <span class="issue"> <a>document order</a> OR
465
- visual order
466
- (<a>grid order</a> in <a>grid containers</a> ,
467
- <a>flex order</a> in <a>flex containers</a> ,
468
- and <a>document order</a> in all other <a>display types</a> )</span> .
465
+ The contents of descendants that are <a>scroll containers</a>
466
+ or that are not <a>block containers</a>
467
+ are skipped over while counting line boxes.
469
468
470
469
If fewer than <var> N</var> line boxes exist,
471
470
then 'max-lines' introduces no <a>region break</a> .
@@ -474,7 +473,13 @@ Limiting Number of Visible Text Lines: the 'max-lines' property</h2>
474
473
(whether imposed by 'max-lines' or by another mechanism,
475
474
such as the 'break-before' /'break-after' properties)
476
475
is treated as the end of the <a>fragmentation container</a> ,
477
- and the rest of the <a>fragmented flow</a> is discarded,
476
+ and the rest of the <a>fragmented flow</a> is laid out in
477
+ the next <a>fragmentation container</a> in the <a>fragmentation context</a> .
478
+
479
+ If there is no subsequent <a>fragmentation container</a>
480
+ (which is the case if the box became a <a>fragmentation container</a>
481
+ merely as a consequence of applying the 'max-lines' property),
482
+ the rest of the <a>fragmented flow</a> is discarded,
478
483
as if it were ''display: none'' :
479
484
it is neither rendered,
480
485
nor measured as part of the box’s contents for the purpose of
@@ -495,6 +500,8 @@ Limiting Number of Visible Text Lines: the 'max-lines' property</h2>
495
500
differently from the rest. -->
496
501
</ul>
497
502
503
+ Only positive integers are accepted. Zero or negative integers are invalid.
504
+
498
505
<h2 id="static-media">
499
506
Overflow in static media</h2>
500
507
0 commit comments