alreq
alreq copied to clipboard
Section on Ellipsis and other Truncations
Filed w3c/csswg-drafts#2125 but thought it's better to ask here.
When the overflowing word is in different direction from the paragraph direction, which part of the word should be truncated?
For example, if a paragraph in the logical order (uppercase means RTL characters):
abcdef ABCDEF
which is laid out this way:
abcdef FEDCBA
and if the last 3 characters overflows, should "FED" be visible, or "CBA"?
IMHO, truncating for ellipsis would work similar to hyphenation (for line-breaking), and therefore should always stay semantic: the letters pronounced first stay, and the ones pronounced later would get cut.
Also, similar to the original question here, I think it's good to mention the positioning, as well, which, again, I believe works similar to hyphenation. In both cases, the ellipsis and the hyphen, they should be located at end of the line.
So,
abcdef FEDCBA
would be cut as
abcdef CBA...
Although, it's really hard to define a good behavior if the embedded/isolated text runs over one full line and needs ellipsis/hyphenation while being embedded. I suppose it's safe to just stay with the general rule and, in all embedded cases, always put the ellipsis/hyphen at the end side, based on the paragraph (base) direction.
The discussion in https://github.com/w3c/csswg-drafts/issues/2125 came up with good conclusions, which I personally agree with, too. I'm going to re-use this issue for documenting basic and complex ellipsis and other truncation behavior.
Thanks, @kojiishi, for bringing it up here.