Re: [csswg-drafts] [css-overflow] Can you line-clamp by both a number of lines and a height at the same time? (#12041)

The CSS Working Group just discussed `[css-overflow] Can you line-clamp by both a number of lines and a height at the same time?`, and agreed to the following:

* `RESOLVED:  revert previous resolution, and discuss in issue an alternative opt-in`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> andreubotella: line-clamp:N clamps by lines. line-clamp:auto clamps by height<br>
&lt;TabAtkins> andreubotella: so someone asked for both, whichever came earlier<br>
&lt;TabAtkins> andreubotella: we previously resolved if you had line-clamp:N *and* a max-height, if height constraint is satisfied first, it would clamp to that height<br>
&lt;TabAtkins> andreubotella: it doesn't seem like this is web compatible<br>
&lt;iank_> q+<br>
&lt;TabAtkins> andreubotella: we were looking into use counters in Chrome, 4% of page loads have a height/max-height set with -webkit-line-clamp, where it's not enough height to cover the element. so it would change behavior to clamp earlier than it currently does<br>
&lt;TabAtkins> andreubotella: Ian speculated a lot of sites were doing "line-clamp:2" and then a height that's twice the line-height, but due to fonts the lines actually end up slightly taller.<br>
&lt;TabAtkins> andreubotella: obviously if content is doing this, you dont' want to break it, especially if it's only be a thin margin<br>
&lt;TabAtkins> andreubotella: so we probably shouldn't do that by default<br>
&lt;TabAtkins> andreubotella: should resolve to *not* do it, that is<br>
&lt;TabAtkins> andreubotella: so do we still want to enable this behavior thru an opt-in?<br>
&lt;florian> q+<br>
&lt;astearns> ack iank_<br>
&lt;TabAtkins> iank_: yeah, I don't think the current spec is compatible<br>
&lt;astearns> ack florian<br>
&lt;TabAtkins> iank_: if font fallback changes metrics and they suddenly get one line instead of two, will be annoying<br>
&lt;TabAtkins> florian: I accept it's not web-compat. still think it's useful, so I'd like an opt-in. don't care what it is, so long as people can do it somehow<br>
&lt;TabAtkins> astearns: so proposed resolution is to revert previous resolution, and discuss in issue an alternative opt-in<br>
&lt;TabAtkins> florian: Ian proposed one, if you say "line-clamp: 3 auto" it would do it. that's just a shorthand value tho, unclear what it means for longhands.<br>
&lt;TabAtkins> iank_: yeah, not sure exactly what the syntax unfolds to.<br>
&lt;TabAtkins> andreubotella: currently "auto" goes to block-ellipsis. we'd have to add another property or change max-lines somehow. i'm fine with not resolving at this meeting<br>
&lt;TabAtkins> florian: I'd prefer to have some indication we intend to solve this, but i'm okay with delaying on the "how"<br>
&lt;TabAtkins> astearns: not hearing any disagreement with that<br>
&lt;TabAtkins> andreubotella: i've spent some time trying to make this behavior (clamping by both) work in chromium, I would be sad if we reverted it :)<br>
&lt;TabAtkins> astearns: [repeats proposed resolution]<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED:  revert previous resolution, and discuss in issue an alternative opt-in<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12041#issuecomment-3808092287 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 23:26:00 UTC