- From: Florian Rivoal via GitHub <noreply@w3.org>
- Date: Wed, 18 Mar 2026 03:14:34 +0000
- To: public-css-archive@w3.org
Some semi-coherent thoughts about how this might work.
I think we have the following options, and maybe want several of them.
We can add an optional keyword to `max-lines`, also exposed through the `line-clamp` shorthand, which makes in count block-level IFCs and block-level replaced elements as 1 line instead of 0. I'm not finding an easy name for this, but as a strawman, let's call it `count-harder`.
We can also make the `continue` property somehow apply not just to block containers, but also to grid and/or flex containers, and when that's the case `max-lines` would count items or grid/flex lines (not text lines). However, "somehow" is important here. It is not going to simply be making `continue: collapse` (and therefore `line-clamp`) apply in all cases. There's going to be a compat problem if we simply turned it on. Both for the usual reasons (stray selectors setting things on elements where they don't have an effect happen, and making them having an effect breaks stuff), and because the webkit-prefixed version relied on being applied to specially prepared flex-boxes, and needs to fail to apply if the [right incantations](https://drafts.csswg.org/css-overflow-4/#webkit-line-clamp) aren't there.
So we need some kind of opt-in in addition to simply targeting the element. This is likely going to be either some alternative value(s) of `continue` other than `collapse`/`discard` (e.g. `continue: drop-flex-lines`…), or an optional value(s) used with `collapse`/`discard` (e.g. `continue: collapse flex-lines`…). So maybe we end up with something like:
```css
#my-grid {
continue: drop-grid-rows;
max-lines: 3;
}
```
Also, I suspect that if there should be an indicator that some flex/gird rows/items have been dropped, it's likely to be managed by something else than`block-ellipsis`, as that's specifically working with lines of text. So we probably don't want `block-ellipsis` to be set flexes and grids when we turn this thing on. I suspect this opt-in should not be exposed through the `line-clamp` shorthand, and that we'll expect people to reach for the individual longhands manually.
--
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12962#issuecomment-4079335306 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 18 March 2026 03:14:35 UTC