alreq icon indicating copy to clipboard operation
alreq copied to clipboard

Section on Ellipsis and other Truncations

Open kojiishi opened this issue 7 years ago • 2 comments

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"?

Test@jsbin

kojiishi avatar Dec 21 '17 18:12 kojiishi

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.

behnam avatar Jan 07 '18 05:01 behnam

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.

behnam avatar Jan 24 '18 23:01 behnam