- From: CSS Meeting Bot via GitHub <noreply@w3.org>
- Date: Thu, 02 Apr 2026 18:26:36 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-overflow-4] Clip floats in clamp containers even when no clamping happens?`, and agreed to the following: * `RESOLVED: we do clip floats even if we hadn't hit the clamp point yet, based on simulated lines or height` <details><summary>The full IRC log of that discussion</summary> <TabAtkins> florian: this is also about float clamping<br> <TabAtkins> florian: if you say line-clamp:15 but only have 3 lines of text, no clamping happens<br> <TabAtkins> florian: but what about the float, if it's taller than 3 lines?<br> <TabAtkins> florian: clip it at the 3 lines, or not clip because we don't clamp?<br> <astearns> no clamp means no clip, imo<br> <TabAtkins> florian: I think from the logic of the spec, when you say line-clamp:15 with only 3 lines, it doens't insert a clamp point<br> <TabAtkins> florian: so makes sense to do nothing<br> <TabAtkins> florian: but is that what we want<br> <TabAtkins> q+<br> <flackr> q+<br> <andreubotella> q+<br> <TabAtkins> florian: I suspect we want to not clip it<br> <astearns> ack TabAtkins<br> <fantasai> TabAtkins: A little strange that if you have 14 lines of text and a very tall float, it's not clamped.<br> <astearns> ack flackr<br> <fantasai> TabAtkins: but I guess it's fine if there's no clamp, no clip<br> <TabAtkins> flackr: same as Tab. I might lean on the other side that it's more predictable to always clip<br> <TabAtkins> florian: if we did want to clip, we could say you size the container as if the float isn't there, and wherever the edge is you clip there<br> <TabAtkins> flackr: taht's what I was imagining. not ideal but more predictable<br> <miriam> q+<br> <TabAtkins> florian: "as if float wasn't there" changes layout, just means ignore its height when calculating the container height<br> <TabAtkins> astearns: so you get more of the float as you add lines?<br> <TabAtkins> TabAtkins: until you hit the clamp point, yeah<br> <astearns> ack andreubotella<br> <TabAtkins> andreubotella: if we don't clamp and don't clip, the height of the line-clamp container would grow to encompass the floats<br> <TabAtkins> andreubotella: because eit's automatically an IFC<br> <TabAtkins> andreubotella: if we're clamping by height and dont' clip it could cause overflow<br> <florian> q+<br> <TabAtkins> andreubotella: it feels to me... I do prefer not to clip but it can get into weird cases if you don't<br> <astearns> ack miriam<br> <TabAtkins> miriam: I don't think it's surprising to say line-clamp:15 to have a sudden change at 15 lines. that's what I asked for<br> <TabAtkins> miriam: similarly if I want scrollbars, they won't trigger until I hit max-height<br> <TabAtkins> miriam: fine to have a change at a certain point, that's what I asked for<br> <TabAtkins> miriam: I think andreu's point that it could mean the float extends the box can be a little more compliated<br> <TabAtkins> miriam: but I just generally don't think it's weird to have a point where it switches<br> <astearns> ack florian<br> <TabAtkins> florian: hearing what andreu said, I think ia gree with them that we'd be closer to matching author intent if we did clip<br> <TabAtkins> florian: if you ask for height clamping, and max-height:500px, but only 300px of content...<br> <TabAtkins> florian: ther'es no clamp point, but if the float is extra tall it's weird for it to not get clamped<br> <TabAtkins> florian: similarly if you said max-lines:5, you expect it to be no taller than 5 lines. if the float is 20 lines tall, weird for it to get 20 lines tall just because you have *less* content than expected<br> <TabAtkins> i'm getting convinced too<br> <TabAtkins> miriam: I think I'm okay. think it's wrong to clamp at 3 lines when you ask for 15<br> <TabAtkins> miriam: the behavior I asked for is to clamp at 15<br> <TabAtkins> florian: we only have so much info. we can clamp at the lines we have or not clamp<br> <miriam> yeah<br> <TabAtkins> astearns: we can extrapolate<br> <TabAtkins> florian: count lh lengths for the leftover lines until clamp point?<br> <TabAtkins> astearns: extrapolating gets line clamping closer to the effect of height clamping<br> <TabAtkins> andreubotella: we could let the height of the line container grow until we get to the point where we're finishing the layout...<br> <TabAtkins> andreubotella: and to figure out the height of the line-clamp container we'd do a max based on float and what we computed as a max<br> <TabAtkins> andreubotella: so we don't grow past that<br> <TabAtkins> florian: I think you meant a min<br> <TabAtkins> andreubotella: ah yes<br> <miriam> I like that better<br> <TabAtkins> florian: more complicated, but probably closer to author intent<br> <TabAtkins> astearns: so in the case where you have line-clamp:15, with 3 lines of content, and a 20 lines float<br> <TabAtkins> astearns: where does it clamp?<br> <TabAtkins> florian: 3 lines of real content + 12 lines of lh space, wherever that ends up cutting the float<br> <TabAtkins> florian: we don't look into the float for content<br> <TabAtkins> astearns: I do worry a bit about inventing concepts for what seems like an edge case<br> <TabAtkins> TabAtkins: it's often layout-breaking to get taller when you have less content, hard to predict<br> <TabAtkins> TabAtkins: proposed: we do clip floats even if we hadn't hit the clamp point yet, based on simulated lines<br> <TabAtkins> TabAtkins: or height<br> <TabAtkins> astearns: objections?<br> <TabAtkins> RESOLVED: we do clip floats even if we hadn't hit the clamp point yet, based on simulated lines or height<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13669#issuecomment-4179668609 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 2 April 2026 18:26:37 UTC