[csswg-drafts] [css-overflow] `block-ellipsis` interaction with height-based `line-clamp` (#10827)

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

== [css-overflow] `block-ellipsis` interaction with height-based `line-clamp` ==
`block-ellipsis` is specified as affecting the line-breaking of a line, such that the width of the block overflow ellipsis is subtracted from the available width of the line. This means that, if a line must be ellipsized, its line height might be shorter than it would otherwise, since there might be tall content at the end of the line that would be pushed to the next line. (And with `text-wrap: pretty` or `text-wrap: balance`, it could be possible for the line height to also grow when ellipsized.)

When used together with the `max-lines` property, this doesn't pose a problem. But it does for height-based clamping, since the height of the lines determines in which line the ellipsis is placed, which in turn determines the height of the lines.

Note that currently, no browser implements `block-ellipsis` the way it's specified. The ellipsis behavior of `-webkit-line-clamp` in all browsers is to line-break without taking the ellipsis into account, and then apply the `text-overflow: ellipsis` behavior on the line to ellipsize, except the ellipsis is placed even if the line doesn't overflow. A `line-clamp` implementation that allows height-based clamping and uses this ellipsis behavior (like the one I'm working at in Chromium) would not have this circularity because the placement of the ellipsis on one line doesn't affect line-breaking.

@frivoal @bfgeek @kojiishi

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 3 September 2024 08:57:33 UTC