[csswg-drafts] [css-overflow] Which kind of boxes accept max-lines?

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-overflow] Which kind of boxes accept max-lines? ==
In b39a87c4b31cb5feab06ad60dce5cbae4f530048 @fantasai changed [`max-lines`](https://drafts.csswg.org/css-overflow-3/#max-lines) from applying to "all non-inline elements" to "block containers (excluding multi-column containers)".

But what about things like flex or grid containers? I'm not convinced that this feature should work across formatting context boundaries, but the spec mentions flex or grid containers, so it seems it does

> line boxes are counted in document order OR visual order (grid order in grid containers, flex order in flex containers, and document order in all other display types)

So if my understanding is correct, it seems I can use

```html
<div style="max-lines: 1">
  <p style="display: flex; width: 0">Lorem ipsum</p>
</div>
```
and I will get

> Lorem

But if I use

```html
<div style="max-lines: 1; display: flex; width: 0">Lorem ipsum</div>
```

then `max-lines` does not apply and I will get

> Lorem
> ipsum

Doesn't make much sense to me.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2408 using your GitHub account

Received on Tuesday, 6 March 2018 20:35:20 UTC