- From: Andreu Botella via GitHub <noreply@w3.org>
- Date: Tue, 06 Jan 2026 11:11:25 +0000
- To: public-css-archive@w3.org
> I don't think we want _quite_ that, given that the current prefixed behavior works by setting the height, and by relying on `overflow: hidden` being set as well... > > I think that what would achieve what you want while staying in overall model we have now would be: > > * if `max-height` is _larger_ than what you'd get from `max-lines`, keep clamping after max-lines, and don't grow the box further > > * if `height` is _larger_ than what you'd get from `max-lines`, keep clamping after max-lines, but also grow the box without revealing any additional content > > * if `height` or `max-height` is _smaller_ than what you'd get from `max-lines`, keep clamping after max-lines, but also shrink the box, and treat any excess content as ink overflow Yeah, that's what should be the case. Or expressed procedurally: 1. Clamp by `max-lines`, ignoring `(max-)height`. 2. Hide any content after clamp. 3. The line clamp container's intrinsic block size is computed as if the hidden content after clamp didn't exist. 4. Sizing the line clamp container works as usual based on the intrinsic block size from the previous step, taking `(max-)height` into account. > That said, I do think that the ability to say "clamp at the earlier of max-lines and max-height" is useful, and I wonder if the compat constraint we are facing applies to both `height` and `max-height`, or just to `height`. If the later, we could have the compatible behavior for `height`, and the "clamp at the earlier point" for max-height. That would be my preference. I don't think we should be doing different things for `height` and `max-height` here. I'd prefer having `line-clamp: 3` only clamp at the 3rd line, and having some other syntax to clamp to the earlier of N lines and the max-height. -- GitHub Notification of comment by andreubotella Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12041#issuecomment-3714303580 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 6 January 2026 11:11:26 UTC