Skip to content

[css-overflow] Continue:collapse, floats, and "immediately preceding" #12786

@frivoal

Description

@frivoal

In #10868, we decided that for the purposes of deciding whether to insert the ellipsis "immediately preceding" the clamp point ignored intervening absolutely positioned elements (and closing element boundaries, but that's not relevant here).

We postponed the question of whether we should ignore all out-of-flow elements, or just absolutely positioned ones. Fixed position is a type of absolute positioning, so that's covered, but floats are separate.

So, given this the following, what should happen:

<p>
  Line 1<br>
  Line 2 <aside>FLOAT</aside>
  Line 3
aside { float: right; }
p {
  font-family: monospace;
  width: 13ch;
  line-clamp: 2; /*implying block-ellipsis: auto*/
  width: 100ch;
}

Rendering A:

Line 1
Line 2  FLOAT

or Rendering B:

Line 1
Line 2… FLOAT

If it's not too much trouble for implementations, I'd argue for rendering B.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions