@@ -450,22 +450,21 @@ Limiting Number of Visible Text Lines: the 'max-lines' property</h2>
450450 remaining content is fragmented away
451451 and neither rendered nor measured.
452452 Specifically,
453+ if the value of 'max-lines' is not <dfn for=max-lines type=value>none</dfn> :
453454
454455 <ul>
455456 <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]]
457460
458- <li> A <a>region break</a> [[!CSS-BREAK-3]]
461+ <li> A <a>region break</a>
459462 is forced after its <var> N</var> th
460463 descendant <a>in-flow</a> <a>line box</a> ,
461464 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.
469468
470469 If fewer than <var> N</var> line boxes exist,
471470 then 'max-lines' introduces no <a>region break</a> .
@@ -474,7 +473,13 @@ Limiting Number of Visible Text Lines: the 'max-lines' property</h2>
474473 (whether imposed by 'max-lines' or by another mechanism,
475474 such as the 'break-before' /'break-after' properties)
476475 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,
478483 as if it were ''display: none'' :
479484 it is neither rendered,
480485 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>
495500 differently from the rest. -->
496501 </ul>
497502
503+ Only positive integers are accepted. Zero or negative integers are invalid.
504+
498505<h2 id="static-media">
499506Overflow in static media</h2>
500507
0 commit comments