[csswg-drafts] [css-overflow-4] nowrap and block-ellipsis (#12811)

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

== [css-overflow-4] nowrap and block-ellipsis ==
Forked from https://github.com/w3c/csswg-drafts/issues/12008, which is mostly about white space collapsing and `block-ellipsis`. This one will be about `block-ellipsis` and `text-wrap: nowrap` (and `white-space: nowrap` and `white-space: pre`, which imply `text-wrap: nowrap`).

@andreubotella said:
> 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 spaces between the end of the word and the ellipsis in white-space: pre text. Do we want that?

@frivoal said:
> For « nowrap does not remove wrap opportunities, it just prevents wrapping » I suspect that can be changed, and have the definition of text-wrap-mode: nowrap say that it suppresses opportunities. In that case, yes, if the whole line (or the whole block) is set to nowrap, then that means you cannot insert the ellipsis in the middle of the line, and you either have to tack it at the very end—including after preserved spaces if any—if there's room, or have to remove the whole line to make room if there isn't, but that seems appropriate: if the content is indivisible, it is indivisible.

@andreubotella said:
> We can probably say "soft wrap opportunities were breaking would be allowed (i.e. not text-wrap: nowrap)" without needing to change css-text.

@andreubotella said:
> IIUC, if there's a forced line break inside text-wrap-mode: nowrap text and there's remaining space to put the ellipsis without overflowing, then the ellipsis gets inserted at the end; otherwise, the line gets displaced by the ellipsis, right?

@frivoal said:
> If text-wrap-mode: nowrap is set on the whole line (or more), yes, that's my understanding.

It seems we are converging on the idea that, current ambiguous phrasinng non withstanding, if we're under a `nowrap` situation, then the block ellipsis also has no insertion point, and either it fits without removing anything, or it needs to remove the whole line.

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


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

Received on Tuesday, 16 September 2025 11:47:10 UTC