You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A region break is forced after its Nth descendant in-flow line box, where N is the specified value of max-lines. The contents of descendants that are scroll containers or that are not block containers are skipped over while counting line boxes.
But I'm not sure if that's enough:
Lines inside table captions
Despite @FremyCompany's complaints, the table wrapper box establishes a BFC and thus is technically a block container. That's not really the case on most browsers, though. Table captions are also block containers, so their lines are not skipped. Is this expected? Not sure.
I don't know much about ruby but I guess ruby annotations should probably be skipped. Less sure about ruby bases.
overflow: clip
This is not a scroll container but visually is identical to overflow: hidden, whose lines are skipped because it's a scroll container.
Out of flow
The spec mentions "in-flow line box". But only things with float or position can be out-of-flow. Line boxes live in the fragment tree and don't own float not position properties, so I think they will always be in-flow (but possibly inside an out-of-flow container).
Either properly define what "in-flow" and "out-of-flow" means for line boxes or skip the contents of out-of-flow descendant boxes.
Other BFC roots
I'm not convinced max-lines should work across formatting context boundaries, even if it's only a BFC.
max-linesis defined withBut I'm not sure if that's enough:
Lines inside table captions
Despite @FremyCompany's complaints, the table wrapper box establishes a BFC and thus is technically a block container. That's not really the case on most browsers, though. Table captions are also block containers, so their lines are not skipped. Is this expected? Not sure.
Lines inside inline-blocks
As said in [css-overflow] Which kind of boxes accept max-lines? #2408 they are block containers but should be skipped
Ruby
I don't know much about ruby but I guess ruby annotations should probably be skipped. Less sure about ruby bases.
overflow: clipThis is not a scroll container but visually is identical to
overflow: hidden, whose lines are skipped because it's a scroll container.Out of flow
The spec mentions "in-flow line box". But only things with
floatorpositioncan be out-of-flow. Line boxes live in the fragment tree and don't ownfloatnotpositionproperties, so I think they will always be in-flow (but possibly inside an out-of-flow container).Either properly define what "in-flow" and "out-of-flow" means for line boxes or skip the contents of out-of-flow descendant boxes.
Other BFC roots
I'm not convinced
max-linesshould work across formatting context boundaries, even if it's only a BFC.