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

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

From: Dimitri Glazkov <dglazkov@google.com>
Date: Fri, 18 Feb 2011 13:20:50 -0800
Message-ID: <AANLkTi=SO1BbDtFgdvL+mNVeVz38ibdui-ZnJHoSz097@mail.gmail.com>
To: Tantek «elik <tantek@cs.stanford.edu>
Cc: Brad Kemper <brad.kemper@gmail.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Jo„o Eiras <joao-c-eiras@telecom.pt>, "www-style@w3.org" <www-style@w3.org>
>> 1. Hiding a timeline label entirely when the video control shrinks
>> small enough to make it start overflowing. †It looks like this could
>> have been achieved with "text-overflow: ellipsis-word '';", and
>> wrapping the label in a <span style="display:inline-block;"></span> if
>> it was multi-word (which it may be once internationalized).
>
> This sounds complex enough that I don't understand it sufficiently to document.
>
> Could you provide more details e.g. †diagrams showing the desired
> affect (or say a URL to a real world public example that implements
> the desired functionality in javascript) ?

http://jsfiddle.net/dglazkov/BJTgu/4/embedded/result/

Open in Safari on 10.5+, and start sizing the window down in width.
Watch the current time / time remaining display (on either side of the
timeline). As the width of the video element reaches a certain
minimum, they disappear to let the timeline stay reasonably-sized for
a bit longer.

Today, it's implemented like this:

http://google.com/codesearch/p#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/html/shadow/MediaControls.cpp&l=556,
which is called repeatedly to detect the overflow boundary. Seems like
something a rendering engine should be able to handle all by itself.

:DG<
Received on Friday, 18 February 2011 21:21:20 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:37 GMT