Skip to content

[css-overflow] Which descendants are skipped in max-lines? #2429

Description

@Loirooriol

max-lines is defined with

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.

  • 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: 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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions