Skip to content

[css-overflow-4] Line-clamp and IFC #10323

Closed
@frivoal

Description

@frivoal

Currently, line-clamp, through continue: discard, is defined not to establish and Independent Formatting Context.

In @andreubotella 's experimmental implementation of it, he found it easier to implement as creating an Independent Formatting Context. Also, in his exploration of the variant of line clamp based on hiding visibility rather than fragmentaiton, (so-called continue: collapse), he found that variant too to be simpler to implement and reason about if we can assume an Independent Formatting Context.

The original idea not to set up an IFC was not particularly driven by use cases, but rather by a theoretical argument: if we can get away without an IFC, it's more flexible, and authors can always opt into having an IFC if they need one. However, the priority of constituencies tells us to put implementation considerations ahead of theoretical concerns, so in the absence of a clear author need, we should keep it simple.

Therefore, the proposal is that, regardless of which approach we take to get to line-clamp, we do establish an IFC.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Wednesday afternoon

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions