- From: Andreu Botella via GitHub <sysbot+gh@w3.org>
- Date: Wed, 26 Mar 2025 07:47:16 +0000
- To: public-css-archive@w3.org
andreubotella has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-overflow] [css-text] Interaction between whitespace collapsing and line-clamp == The current spec text for [`block-ellipsis`](https://drafts.csswg.org/css-overflow-4/#block-ellipsis) (which is one of the longhands for `line-clamp`) says that when an ellipsis is inserted on the last line before clamp, it must be placed after the last soft wrap opportunity that would make the line with the ellipsis not overflow, considering that the content after the ellipsis gets pushed to the next line box or fragment. However, according to the Unicode line breaking algorithm, ASCII spaces don't have a break opportunity before them, but only after them. Which means any soft wrap opportunity caused by a space would show the ellipsis *after* the space, not at the end of the word. Or at least that would be the case if the ellipsis inline is added at the end of the line box during line breaking and before [phase II of whitespace processing](https://drafts.csswg.org/css-text-4/#white-space-phase-2). There's also the fact that the `block-ellipsis` spec text allows inserting the ellipsis in the middle of `text-wrap: nowrap` text, since it only talks about finding the last soft wrap opportunity, and `nowrap` does not remove wrap opportunities, it just prevents wrapping. Given that, the question comes up of how trailing whitespace would work before the ellipsis inside `white-space: pre` text. If we just say to collapse as usual according to phase II, and then add the ellipsis, we would still have a space between the end of the word and the ellipsis in `white-space: pre` text. Do we want that? Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12008 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 26 March 2025 07:47:17 UTC