Re: [csswg-drafts] [css-text] Indent-preserving wrapping (#8733)

I wonder if the “showing the automatic line breaks” could be a part https://github.com/w3c/csswg-drafts/issues/8874 — while it is talking about showing the existing invisible characters, showing the automatic wrap character feels very close to it.

Otherwise, yes, we'd need for every line to have this symbol, as there might be a lot of lines wrapping (showing the “wrapped line gets an additional indentation” case, as something that can also be desirable, and which is better for this particular demonstration):

<img width="300" alt="An illustration showing a block with monospace “lorem ipsum” text that wraps in a way the left edge becomes indented for all the wrapped lines, showing how there are multiple lines that wrap and that could benefit from the wrap symbol." src="https://github.com/w3c/csswg-drafts/assets/177485/e1e1ba90-1721-439b-9bbc-0682d476b24c">

And another issue to think about: how should this pseudo-element be placed? If it would be placed as an actual element, it could lead to the issue where the same length of text could look different based on if it was resized or not: if it fits on a line, there is no pseudo-element added. Let's say one symbol wraps, and there is not enough space for adding the pseudo-element — that would mean that an additional symbol (or more) would wrap. Now, let's resize the container so that all except for one symbol would get back on the previous line: we'd need to resize to a larger width in order to have enough space that the wrapped symbol would get onto the original line.

This is something I did encounter in my practice multiple times when implementing the “showing the overflow menu” pattern, and I feel that it also applies to this case.

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


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

Received on Monday, 11 September 2023 11:23:44 UTC