Re: [csswg-drafts] [css-overflow-4] Syntax to opt into clamping at the earlier of a size and a number of line (#13670)

The CSS Working Group just discussed `[css-overflow-4] Syntax to opt into clamping at the earlier of a size and a number of line`, and agreed to the following:

* `RESOLVED: accept proposal in this comment, with change of moving auto value to max-lines longhand`
* `RESOLVED: no special processing; this all works with webkit-legacy as well`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> florian: a while back we talked about how it's not web-compat simultaneously, by default, clamp by lines *and* height<br>
&lt;TabAtkins> florian: if you say 3 clamping by lines works, 'auto' clamp by height works, but doing which happens first doesn't work by default<br>
&lt;TabAtkins> florian: coming up with an opt-in<br>
&lt;TabAtkins> florian: goal is, if you use shorthand and say "auto 3" it'll clamp by both, whichever comes first<br>
&lt;TabAtkins> florian: how does that work with longhands<br>
&lt;TabAtkins> florian: max-lines doesn't change, none | int<br>
&lt;TabAtkins> florian: continue: normal | collapse &amp;&amp; auto?<br>
&lt;TabAtkins> florian: collapse is count only, collapse auto is both<br>
&lt;TabAtkins> florian: block-ellipsis is unchanged<br>
&lt;TabAtkins> florian: this all rolls up into the shorthand in what I think kis the obvious way<br>
&lt;TabAtkins> florian: so this changes nothing to what's already shipped<br>
&lt;TabAtkins> florian: but rejiggered some new stuff<br>
&lt;TabAtkins> florian: contineu:normal is what used to be "auto" but i'm using that for something else<br>
&lt;TabAtkins> block-ellipsis:no-ellipsis also used to be "auto"<br>
&lt;astearns> q+<br>
&lt;TabAtkins> florian: I gave in the gh issue some syntax examples<br>
&lt;TabAtkins> florian: because it rejiggered in a minor way all these things, if we want to do it it needs to happen now, before shipping<br>
&lt;andreubotella> q+<br>
&lt;TabAtkins> astearns: to clarify, you had to rename the block-ellipsis values to avoid shorthand collision?<br>
&lt;TabAtkins> florian: yes<br>
&lt;astearns> ack astearns<br>
&lt;TabAtkins> florian: currently shorthand is deceptively doing right thins for wrong reasons<br>
&lt;TabAtkins> florian: line-clamp:3 clamps by 3 lines, line-clamp:auto clamps by height but by accident, that "auto" is actually a block-ellipsis values. it's the lack of a number that triggers height clamping<br>
&lt;astearns> ack andreubotella<br>
&lt;TabAtkins> andreubotella: I don't have issue with these auto renames<br>
&lt;TabAtkins> andreubotella: for line-clamp, the absence of an integer still causes continue to be collapse auto<br>
&lt;TabAtkins> andreubotella: but you can also set `3 auto` on purpose<br>
&lt;TabAtkins> andreubotella: that seems fine<br>
&lt;arronei> q+<br>
&lt;TabAtkins> andreubotella: with -webkit legacy it seems complicated<br>
&lt;florian> q+<br>
&lt;florian> q-<br>
&lt;TabAtkins> andreubotella: not a keyword included in here<br>
&lt;florian> q++ to respond on the webkit legacy<br>
&lt;TabAtkins> andreubotella: you couldn't have auto keyword when you have webkit-legacy, would also need an integer...<br>
&lt;TabAtkins> andreubotella: seem fine with that<br>
&lt;TabAtkins> andreubotella: wouldn't be easy to express the entire legacy syntax without having a totally separate grammar branch<br>
&lt;TabAtkins> andreubotella: think saying "auto" and "webkit-legacy" together would be invalid<br>
&lt;TabAtkins> andreubotella: I don't have a problem with this but it seems complicated<br>
&lt;astearns> ack +<br>
&lt;Zakim> +, you wanted to respond on the webkit legacy<br>
&lt;TabAtkins> florian: I wanted to talk without the webkit-legacy first, to check it makes sense<br>
&lt;TabAtkins> florian: for legacy part, two ways<br>
&lt;TabAtkins> florian: one, keep minimalist as we've done so far, it doesn't include height clamping<br>
&lt;TabAtkins> florian: so `continue` gains one more keyword, the legacy thing, and rejigger the shorthand so you can't say "auto" and "legacy" at same time<br>
&lt;TabAtkins> florian: or we do allow them at the same and allow height clamping. don't care<br>
&lt;TabAtkins> florian: the shorthand syntax is just a little weird<br>
&lt;TabAtkins> andreubotella: for me not having webkit-legacy makes sense, it makes the set of shorthand values a bit awkward<br>
&lt;TabAtkins> andreubotella: either nearly-identical branches, or ban it in prose<br>
&lt;TabAtkins> florian: I think `[auto | webkit-legacy]` would work?<br>
&lt;TabAtkins> andreubotella: right now webkit-legacy can only go at the end<br>
&lt;TabAtkins> florian: ah I see<br>
&lt;TabAtkins> florian: so whichever is fine, depending on whether we want to keep shorthand more complicated or allow legacy to gain new features<br>
&lt;TabAtkins> andreubotella: i'm fine with the shorthand getting more complicated. webkit-legacy shouldn't be used by devs anyway<br>
&lt;astearns> ack arronei<br>
&lt;TabAtkins> arronei: if we're doing some renames here, I don't love 'block-ellipsis: ellipsis' and no-ellipsis. lots of repeat. don't have great suggestions<br>
&lt;TabAtkins> arronei: like 'hidden' becomes a little ambiguous..<br>
&lt;TabAtkins> arronei: just a general discomfort<br>
&lt;florian> q+ to respond to arronei<br>
&lt;astearns> ack florian<br>
&lt;Zakim> florian, you wanted to respond to arronei<br>
&lt;TabAtkins> fantasai: note it matches text-overflow:ellipsis<br>
&lt;TabAtkins> florian: right. over there it's not a repeat, here it is.<br>
&lt;TabAtkins> florian: "none" is used for something else, is why it's not used here<br>
&lt;TabAtkins> q+<br>
&lt;TabAtkins> fantasai: it works well in the shorthand, which is probably what people would use anyway<br>
&lt;TabAtkins> arronei: would we be against change the property name...?<br>
&lt;TabAtkins> florian: in principle no but I don't have a suggestion for rit<br>
&lt;TabAtkins> florian: suggest in the absence of an idea we go with this for now<br>
&lt;astearns> ack fantasai<br>
&lt;TabAtkins> fantasai: overall this makes sense<br>
&lt;TabAtkins> fantasai: especially the way the shorthand maps out<br>
&lt;TabAtkins> fantasai: the way we have auto tracked onto collapse strikes me as weird<br>
&lt;TabAtkins> fantasai: continue is about what you do with the overflowing content<br>
&lt;TabAtkins> fantasai: auto is about the eheight<br>
&lt;TabAtkins> fantasai: that's totally different concept<br>
&lt;TabAtkins> fantasai: and "auto" is so generic there<br>
&lt;TabAtkins> florian: I considered putting it into max-lines<br>
&lt;TabAtkins> florian: but if continue:discard is a thing, it has the behavior already<br>
&lt;TabAtkins> florian: that's just how fragment works<br>
&lt;TabAtkins> florian: so it's a mode of collapse<br>
&lt;TabAtkins> fantasai: it's a variant of collapse because we decided collapse doesn't do that by default<br>
&lt;TabAtkins> florian: yeah but the other values don't have that. it would be weird to have discard not to both by default<br>
&lt;TabAtkins> fantasai: auto is just so generic, if it's shorthand magic it's fine.<br>
&lt;fantasai> scribe+<br>
&lt;fantasai> TabAtkins: Go ahead and put it in max-lines. It's fine for some parts of the property to not apply.<br>
&lt;fantasai> TabAtkins: max-lines seems like the right place to put it<br>
&lt;fantasai> florian: So maybe move auto to max-lines<br>
&lt;fantasai> florian: or maybe split collapse into two variants, collapse-variant1 and collapse-variant2<br>
&lt;fantasai> florian: If you don't have 'auto' you only clamp by number of lines. With it, you can clamp by either lines or height.<br>
&lt;fantasai> TabAtkins: You either specify auto and get height clamp, or lines and get line clamp, or both and get both clamp.<br>
&lt;fantasai> TabAtkins: So 'auto' seems ok. Height I don't want cuz writing modes. Size is weird.<br>
&lt;fantasai> TabAtkins: But you determine the max-lines automatically based on the height of the box.<br>
&lt;fantasai> TabAtkins: 'auto' is fine.<br>
&lt;TabAtkins> andreubotella: so then 'auto' is independent of legacy because eit's different property<br>
&lt;TabAtkins> andreubotella: and that's simpler<br>
&lt;astearns> consider-height?<br>
&lt;TabAtkins> fantasai: makes sense<br>
&lt;TabAtkins> astearns: proposed, accept proposal in this comment, with change of moving auto value to max-lines longhand<br>
&lt;astearns> ack TabAtkins<br>
&lt;fantasai> TabAtkins: You said you switched to no-ellipsis to avoid clash with none.<br>
&lt;fantasai> florian: We resolved on that awhile back. I think it was about that.<br>
&lt;fantasai> andreubotella: Paris. Pretty sure it was none previously, and was to avoid the clash.<br>
&lt;astearns> s/the clash/the clash with max-lines/<br>
&lt;fantasai> florian: line-clamp: none; would give no clamping. But line-clamp: 3 none; would give you clamping with no ellipsis which seemed weird.<br>
&lt;fantasai> florian: It wasn't that we couldn't parse it, but it was confusing.<br>
&lt;TabAtkins> astearns: so any objections?<br>
&lt;TabAtkins> RESOLVED: accept proposal in this comment, with change of moving auto value to max-lines longhand<br>
&lt;TabAtkins> florian: and about webkit-legacy, keep it minimalist or allow it to be combined with new functionality?<br>
&lt;TabAtkins> andreubotella: if "auto" is in continue, I see a much stronger point to not allowing both at the same time<br>
&lt;TabAtkins> andreubotella: for the shorthand, there's already thing you can do with webkit-legacy that you couldnt' do with -webkit-line-clamp<br>
&lt;TabAtkins> andreubotella: so i'm fine with allowing it<br>
&lt;TabAtkins> florian: so proposal is this also works with webkit-legacy<br>
&lt;TabAtkins> TabAtkins: what property does the value live in?<br>
&lt;TabAtkins> florian: continue<br>
&lt;TabAtkins> florian: so trying to ban it would be a little awkward<br>
&lt;TabAtkins> astearns: do we need to resolve?<br>
&lt;TabAtkins> florian: it falls out somewhat naturally, but might as well resolve<br>
&lt;TabAtkins> florian: proposed: no special processing; this all works with webkit-legacy as well<br>
&lt;TabAtkins> RESOLVED: no special processing; this all works with webkit-legacy as well<br>
</details>


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