Re: [csswg-drafts] [css-overflow] [css-text] Interaction between whitespace collapsing and line-clamp (#12008)

> I think the case where I'm least comfortable is when the line ends with preserved white-space (which is thus not discarded) which hang (as can happen with white-space: pre-wrap). This is different from the nowrap case: here, we can wrap, but we did ask for preserving. In that case, what would fall out of the above is that the ellipsis would be inserted after the space, even though the line is wrapable. This may also be the desirable behavior (the author did ask for spaces to be preserved after all), but I'm less sure.

@frivoal we have a widely used application that could benefit from ellipsis being inserted immediately after the last visible character, not after trailing whitespaces. We need to preserve leading whitespaces for consistency with user-input, but the trailing whitespaces are never useful during text truncation — they just make the ellipsis appear misplaced. Just wanted to leave a small nudge in this direction, considering that you are planning to discuss this issue in the next August meeting.

In the meantime, may I ask if you know of any existing workaround for this issue?

Here is a playground illustrating the problem: https://developer.mozilla.org/en-US/play?id=B3oq%2Fn8ED%2F%2FKYcWua8QrvViWDqyQRGVFH6LvsbApCEZ2Tg7IbT5YQ2u9W9de5w8jbaTQvOZ8vvVMciVS

Thanks!

-- 
GitHub Notification of comment by franciscolourenco
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12008#issuecomment-3218329789 using your GitHub account


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

Received on Sunday, 24 August 2025 19:42:12 UTC