W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Re: [CSS3-UI] text-overflow:ellipsis (freshly rewritten/expanded and incorporated into editor's draft)

From: Robert O'Callahan <robert@ocallahan.org>
Date: Fri, 28 Jan 2011 21:58:40 +1300
Message-ID: <AANLkTik1UZxAh-ErArCBaA+KM63GxAYsFqWvO1ta+Evs@mail.gmail.com>
To: Tantek Çelik <tantek@cs.stanford.edu>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style@w3.org
On Fri, Jan 28, 2011 at 5:13 PM, Tantek Çelik <tantek@cs.stanford.edu>wrote:

> On Wed, Jan 26, 2011 at 13:45, Robert O'Callahan <robert@ocallahan.org>
> wrote:
> > I suggest not following Opera and Webkit for bidi behavior. This example:
> > <div dir="rtl" style="text-overflow:ellipsis; overflow:hidden;
> > width:60px;">HelloKitty</div>
> > renders as "...Hello" in Webkit and Opera, which I think is clearly
> wrong.
> > IE renders it as "...loKitty", which I think is right.
> fantasai and I were unable to reproduce your results, on the contrary
> we got interop between Opera, WebKit, IE8, IE9 on that example:
> <div dir="rtl" style="text-overflow:ellipsis; overflow:hidden;
> width:60px;">HelloKitty</div>
> "...Hello"
> that is - ALL implementations:
> * truncate grapheme clusters as necessary in *reverse document source
> order* regardless of block direction (dir, direction property, etc.).
> * render the ellipsis on the tail of the block direction (ltr = on the
> right, rtl = on the left) for text that is all in a LTR language.

I see. IE9 gives different results depending on whether it's in quirks mode
or not; I had it in quirks mode by mistake. Sorry.

> Also try playing with this example:
> > <div style="text-overflow:ellipsis; overflow:auto; width:10%;
> height:100px;
> > border:1px solid black; font-size:16px;
> > white-space:pre;">HelloKittyוסוכנויות</div>
> > IE clips visually, Webkit and Opera clip logically. I think the WG
> > eventually decided that visual clipping was better (and I agree).
> In this case as well there was interop across IE9/Opera/WebKit on
> truncation, that is:
> * all implementations truncated in reverse document source order
> Rendering was slightly different.
> Opera and Webkit continue with the literal visual/physical display of
> ellipsis per block direction as noted above.
> e.g.:
> "HelloKittyוסוכנ..."
> However, IE9 displayed the ellipsis *between* the HelloKitty and the
> Hebrew characters (Per fantasai and my test yesterday, fantasai please
> confirm this.)
> "HelloKitty...וסוכנ"

I can't reproduce this in IE9 standards mode. In fact, it seems to behave
like Opera and Webkit now. Testcase attached; I can't get the ellipsis to
appear in the middle of the text at any window width.

Aside: they also have Webkit's behavior for overflow:scroll --- the
placement of the ellipsis doesn't change as you scroll, so eventually the
text scrolls completely out of view and nothing is visible. This seems
clearly wrong to me.

> The problem here is that there is no real interop for text-overflow with
> > bidi text.
> I don't know what you mean by "real interop".

I was wrong, sorry.

"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]

Received on Friday, 28 January 2011 08:59:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:42 UTC