Skip to content

[css-overflow] block-ellipsis displaced line strut clarification #13786

@andreubotella

Description

@andreubotella

When the block-ellipsis property (one of the line-clamp longhands) inserts an ellipsis, it can completely displace the contents of a line. When this happens, "the line box is considered to contain a strut, as defined in CSS 2 § 10.8.1 Leading and half-leading." (The more recent non-CR definition is in css-inline-3.)

However, this turns out to be ambiguous. A strut is associated with an inline box (including the root inline box), and its metrics depend on the inline box's styles. So what happens when the clamp point is inside multiple inline boxes?

My understanding of this so far was the strut mentioned corresponded to the root inline box, and that other inline boxes didn't affect this, but this isn't explicit in the spec text at all.

cc @frivoal

Metadata

Metadata

Assignees

No one assigned

    Labels

    css-overflow-4topic: line-clampline-clamp, -webkit-line-clamp, and related long hands, not including continue:discard

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions