Re: [csswg-drafts] [css-overflow-4] where to clamp when a float pushes a whole line down (#12817)

The CSS Working Group just discussed `[css-overflow-4] where to clamp when a float pushes a whole line down`, and agreed to the following:

* `RESOLVED: Clamp at the bottom of the last line or in-flow block-level box before the clamp point`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> florian: several things we're not discussing... not talking about slicing floats and so on<br>
&lt;emilio> ... if you have a reasonably narrow float, next to it there are lines, and that's fine<br>
&lt;emilio> ... we're looking at whether your float is large enough there's no line next to it<br>
&lt;emilio> ... in the example we clamp after 5 lines<br>
&lt;emilio> ... and a float is after 4<br>
&lt;emilio> ... we're clamping five line-heights, clamp point is right after the float but there's no line there<br>
&lt;emilio> ... so we can't clamp after line 4 because line 5 is not next to it<br>
&lt;emilio> ... so we'd need to clamp between 3 and 4<br>
&lt;emilio> ... which is sillly<br>
&lt;emilio> ... so let's not do that?<br>
&lt;emilio> fantasai: isn't it similar to clamping with a margin?<br>
&lt;emilio> ... imagine instead of a float we have a margin<br>
&lt;emilio> florian: right now it's undefined if the break point is not between lines<br>
&lt;andreubotella> q+<br>
&lt;emilio> ... the two lines are not adjacent<br>
&lt;emilio> fantasai: you'd clamp between 4 and 5 and define the clamp point is at the bottom of line 4<br>
&lt;astearns> ack andreubotella<br>
&lt;emilio> florian: I think what you're saying let's us amend the resolution to skip floats _and_ absposes<br>
&lt;astearns> qq+ iank_<br>
&lt;emilio> andreubotella: if we have two line boxes separated by a float<br>
&lt;emilio> ... do we consider them siblings?<br>
&lt;emilio> fantasai: yes<br>
&lt;emilio> andreubotella: then the current spec would be right<br>
&lt;emilio> ... in this specific case<br>
&lt;emilio> ... if we have a float between block siblings then that's different<br>
&lt;emilio> fantasai: I think the lines are siblings, I don't think we define a line box tree or something<br>
&lt;emilio> ... line boxes are their own tree<br>
&lt;emilio> q+<br>
&lt;emilio> ... so they have a concept of containment that's independent of the box tree<br>
&lt;emilio> andreubotella: I think those should count as consecutive?<br>
&lt;emilio> ... if a float pushes it down is it still consecutive?<br>
&lt;emilio> fantasai: florian: yes<br>
&lt;emilio> andreubotella: we should have that in the spec<br>
&lt;emilio> florian: there's a remaining subtlety<br>
&lt;emilio> ... they are not adjacent<br>
&lt;emilio> ... so where do we put the ellipsis?<br>
&lt;emilio> fantasai: we need to define that<br>
&lt;emilio> emilio: bottom of the last line before the clamp point?<br>
&lt;emilio> fantasai: yes<br>
&lt;florian> yes<br>
&lt;florian> q?<br>
&lt;emilio> andreubotella: there's another issue which is if we're clamping between two in-flow block-level sibling boxes<br>
&lt;emilio> ... I assume that means we already don't count floats<br>
&lt;emilio> ... so we'd clamp before the float<br>
&lt;emilio> q-<br>
&lt;emilio> ack iank_<br>
&lt;Zakim> iank_, you wanted to react to andreubotella<br>
&lt;astearns> ack iank_<br>
&lt;emilio> iank_: I think I'm fine, but this is only about line-clamp: auto case right?<br>
&lt;astearns> ack dbaron<br>
&lt;Zakim> dbaron, you wanted to mention clear<br>
&lt;emilio> ... the number case is also well defined?<br>
&lt;emilio> florian: yes<br>
&lt;emilio> dbaron: should we think about clearance?<br>
&lt;florian> q+<br>
&lt;emilio> ... might be worth thinking about whether `clear` (which you can only exercise within a nested block) behaves similarly here<br>
&lt;astearns> ack fantasai<br>
&lt;emilio> fantasai: can also specify it on `&lt;br>`<br>
&lt;emilio> fantasai: the other answer is that the clamp point is at the height<br>
&lt;emilio> andreubotella: then it's only about where you clamp<br>
&lt;emilio> fantasai: if you clamp at 5lh that's what the author said, otherwise you clamp at 4lh<br>
&lt;emilio> florian: but there's nothing in between 4lh and 5lh<br>
&lt;emilio> fantasai: there's the float<br>
&lt;fantasai> emilio: The float would overflow no matter what, question is whether it overflows totally or partially<br>
&lt;fantasai> fantasai: Also question of how much it overflows<br>
&lt;fantasai> emilio: You're positioning the ellipsis at the top (at 4lh) then shouldn't you clamp at 4lh?<br>
&lt;fantasai> florian: If you ask for a height-based lamp point, you're not guaranteed exactly that much content<br>
&lt;fantasai> florian: you'll always get entire things<br>
&lt;fantasai> fantasai: what if I asked for height: 5lh?<br>
&lt;emilio> florian: that'd behave differently<br>
&lt;emilio> emilio: it clamps the auto height<br>
&lt;astearns> ack florian<br>
&lt;emilio> emilio: if you want the behavior of getting 5lh you can use height: 5lh<br>
&lt;emilio> ... then you get the behavior you want<br>
&lt;emilio> florian: re. clearance I suspect we get similar behavior, it doesn't matter whether the content gets push down due to clearance<br>
&lt;emilio> ... or due to lack of space<br>
&lt;fantasai> emilio: We clamp at the bottom of the last line that is before the clamp point.<br>
&lt;fantasai> andreubotella: last line or block-level box<br>
&lt;fantasai> emilio: floats..<br>
&lt;emilio> RESOLVED: Clamp at the bottom of the last line or in-flow block-level box before the clamp point<br>
&lt;emilio> emilio: which box, margin box?<br>
&lt;emilio> florian: should be defined but if it's not new issue<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12817#issuecomment-3807831353 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 27 January 2026 22:26:58 UTC