- From: CSS Meeting Bot via GitHub <noreply@w3.org>
- Date: Tue, 27 Jan 2026 21:54:35 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-overflow-4] max-lines and independent formatting contexts`, and agreed to the following: * `RESOLVED: Keep the behavior of line-clamp as-is, but design an opt-in for max-lines to count IFCs/tracks/lines to satisfy this use case` <details><summary>The full IRC log of that discussion</summary> <emilio> fantasai: this came up when discussing select<br> <emilio> ... the fact that max-lines counts line is useful but it doesn't count ifcs<br> <emilio> ... options in a select they are each one line but with customizable selects they could be a flexbox<br> <emilio> ... and it seemed useful that max-lines should count theme<br> <emilio> s/theme/them<br> <emilio> ... ian and tab say it probably runs into compat issues<br> <emilio> ... but they noted that line-clamp in other than a flexbox or other such formatting context it could be made to work<br> <emilio> q+<br> <emilio> TabAtkins: proposal is making max-lines do something useful in other display-modes so it adds children or lines (whatever appropriate)<br> <emilio> iank_: implementation wise we could ship unprefixed line-clamp ahead of this<br> <florian> q+<br> <emilio> ... assuming we don't split it out into all its shorthands<br> <emilio> TabAtkins: it'd be a potential compat issue<br> <oriol> q+<br> <emilio> iank_: already a compat issue for the -webkit- version right?<br> <emilio> florian: we might want to differentiate the -webkit- line clamp<br> <emilio> emilio: let's not<br> <emilio> florian: otherwise you try to apply lineclamp to a flexbox and it doesn't work<br> <emilio> ... if you do so it turns the flexbox into a block and then applies<br> <emilio> ... if you don't then it stays a flexbox<br> <emilio> ... for every page that has set up the webkit line-clamp a little wrong it might break<br> <emilio> iank_: we have a use counter for this, it'll break pages<br> <emilio> ... there's also autoprefixers that remove<br> <emilio> emilio: then differentiating the -webkit- prefix doesn't really help either right?<br> <emilio> florian: so we need an opt-in<br> <emilio> fantasai: key off block-ellipsis?<br> <emilio> iank_: that might work<br> <emilio> (+1)<br> <florian> q-<br> <astearns> ack emilio<br> <fantasai> scribe+<br> <fantasai> emilio: Seems like keying off of block-ellipsis may be useful, because you don't need to figure out how to put an ellipsis on e.g. a flexbox<br> <iank_> q+<br> <fantasai> emilio: Also it seems like it could be a useful thing in block layout, so this would make it possible to opt in<br> <fantasai> TabAtkins: problem with block is that you have mixed text lines and blocks<br> <fantasai> emilio: if it's opt in, no compat issue<br> <fantasai> emilio: not hard either way, you have lines. Some are IFCs, we skip over atm.<br> <fantasai> TabAtkins: so opposite, count IFCs instead of lines<br> <fantasai> emilio: I was thinking you count both<br> <fantasai> emilio: Seems useful<br> <astearns> ack oriol<br> <fantasai> emilio: and doesn't do anything useful on flexboxes atm<br> <emilio> oriol: If I understand correctly it'd work when set directly on flex / grid<br> <fantasai> oriol: If I understand, proposal is that it would work when set directly on flex or grid container<br> <emilio> ... would it recurse on a flex child?<br> <emilio> TabAtkins: it wouldn't recurse<br> <emilio> ... flex children are IFCs<br> <emilio> oriol: would it count as 0 or 1?<br> <astearns> ack iank_<br> <emilio> TabAtkins: counting as 1 was a way of making this work with the existing functionality, but leaning to an opt-in<br> <emilio> oriol: sounds good then<br> <emilio> iank_: just for a sense of the compat issue, it's in 40% of loads, so deviating from current -webkit-line-clamp is hard<br> <emilio> ... auto-prefixers are also adding unprefixed line-clamps<br> <emilio> ... general preference is keeping -webkit-line-clamp the same<br> <emilio> ... so we don't need to come back here :)<br> <emilio> ... fine with this working in other layout modes as long as it's opt-in<br> <emilio> ... the explicit compat issue of changing atm is that it's not inconceivable that someone places an empty div or flex<br> <astearns> ack fantasai<br> <emilio> ... so I think we're a bit constrained<br> <emilio> fantasai: the benefit of using block-ellipsis as the opt-in is that line-clamp sets it to something<br> <emilio> iank_: so we could ship line-clamp without shorthandifying<br> <emilio> astearns: do we want to resolve on this opt-in?<br> <fantasai> emilio: 2 options - keying off block-ellipsis and adding some opt-in into max-lines explicitly<br> <fantasai> emilio: Both are fine compat-wise, question is, do you want both behaviors in max-lines<br> <florian> q+<br> <fantasai> emilio: It'd be a bit weird if in order to get the non-IFC thing you have to set block-ellipsis to an empty string<br> <astearns> ack florian<br> <fantasai> florian: Depends on whether we only want to have it apply to flex directly<br> <fantasai> florian: there's nowhere to put ellipsis anywhere anyway<br> <fantasai> florian: but if a block has flex children and want to count the flex children, then that's different<br> <fantasai> fantasai: Not proposing to cross IFC boundaries<br> <fantasai> florian: Currently flex containers don't get counted.<br> <fantasai> florian: Could count as 0 or 1 or number of children<br> <fantasai> emilio: No, counting children is crossing IFC boundaries<br> <TabAtkins> q+<br> <fantasai> emilio: The only thing keying off block ellispsis doesn't allow is to count IFCs *and* put a block ellipsis<br> <TabAtkins> q-<br> <fantasai> florian: block-ellipsis isn't set on the clamping container, and takes effect on the innermost block<br> <fantasai> TabAtkins: propose to not resolve on a specific syntax now, but resolve that we will create an IFC-counting system<br> <fantasai> astearns: but not changing what line-clamp does<br> <emilio> PROPOSED: Keep line-clamp as is, design opt-in to allow counting IFCs to solve this use-case<br> <fantasai> PROPOSED: Keep the behavior of line-clamp as-is, but design an opt-in for max-lines to count IFCs to satisfy this use case<br> <oriol> q+<br> <fantasai> PROPOSED: Keep the behavior of line-clamp as-is, but design an opt-in for max-lines to count IFCs/tracks/lines to satisfy this use case<br> <florian> q-<br> <astearns> ack oriol<br> <fantasai> oriol: Instead of having to use an opt-in, what about an opt-out that would be automatically set using -webkit-line-clamp<br> <fantasai> emilio, iank_: Need to also set for unprefixed line-clamp. It's being used already.<br> <fantasai> RESOLVED: Keep the behavior of line-clamp as-is, but design an opt-in for max-lines to count IFCs/tracks/lines to satisfy this use case<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12962#issuecomment-3807724332 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 21:54:36 UTC