Re: [css3-ui] Support cropping in the middle of texts using 'text-overflow'

On 11 August 2013 22:47, Brad Kemper <> wrote:

> On Jul 22, 2013, at 3:59 PM, Sebastian Zartner wrote:
> On 20 July 2013 16:51, Brad Kemper <> wrote:
>> On Jul 18, 2013, at 3:09 PM, Kenneth Auchenberg <>
>> wrote:
>> Great initiative to get this much desired functionality speced out .
>> Do we know of similar middle text truncation is implemented in platforms,
>> like Mac OSX?
>> Would be great with consistency between the web and existing platforms.
>> -
>> Kenneth Auchenberg
>> +45 53 22 22 33
>> On Thu, Jul 18, 2013 at 11:38 PM, Sebastian Zartner <
>>> wrote:
>>> As I already proposed earlier[1] there should be a way to allow
>>> truncating text contents in the middle.
>>> I was asked to add the current proposal to the W3C wiki to allow further
>>> discussion on this. So here it is:
>>> There are definitely still some unconsidered parts, so it would be great
>>> to hear some opinions on this.
>>> Sebastian
>>> [1]
>> I understand the need for text-overflow-min-width, but I don't really get
>> why we need start, middle, and end values. If text-overflow-min-width is
>> more than zero (1ch, for instance), then the ellipsis or string or clipping
>> would happen in the middle somewhere, and you would not then also want
>> additional ellipsis, strings in other positions (and the clipping would
>> occur as a natural result of where the the one ellipsis or string did go).
> The defintion of text-overflow-min-width is not totally correct yet.
> What's probably expected is to have either start/end truncation or middle
> truncation, but not both at the same time.
> I.e. what it should be able to handle is this:
> Whole text:
> This is some truncated text.
> End truncation:
> This is so…
> Start truncation:
> …ated text.
> When is this actually needed for text overflow? Can you provide for
> samples, perhaps from in print or something, where the start of the text is
> missing, in favor of the end showing?

The use case I need that for are file names. In print doesn't have dynamic
text cropping, so I'm not sure what you want here. Other use cases for
text-overflow-min-width are samples of texts having some kind of [more]
link at the end, which can be seen on many pages.

> Start and end truncation:
> …ome trunca…
> That looks pretty odd to me, and not readable.

Well, truncating at both sides at the same time is not my invention.[1] I
just wanted to ensure that text-overflow-min-width is handled correctly in
that case.

> Middle truncation:
> This …text.
> For start/end truncation text-overflow-min-width would just need to hold
> one value, while for middle truncation you may want to define the min.
> width of the start and end part separately.
> That seems like overkill, and would result in more cases where the text is
> unable to be truncated further. What then? Wouldn't it be better to keep
> truncating in the middle than to, what, overflow the box on the right

No. The purpose is to keep the text readable (or at least identifyable) as
long as possible. If you think there's an easier way to define the minimal
width of truncated text, I'd like to hear your idea.

> So it would hold two values. This differentiation is not written down in
> the wiki page yet.
> I'm open for ideas how to achieve the above.
> Also, I think text-overflow-min-width would need to be more of a
>> suggestion than an absolute, as you would probably want to ensure at least
>> one character at the start, in case the value was larger than the length of
>> the line.
> I believe that should be up to the author. But of course a good default
> value like e.g. 1ch should be chosen.
> If the author's intent is to have middle truncation, then I don't think
> min values should prevent the browser from doing that smartly once it
> reaches the extremes.

If the author doesn't care about how the truncation happens, it's ok to let
the browser do that smartly. Though there are situations, in which you want
to influence the truncation as I mentioned above, to which you already
agreed before.



Received on Monday, 12 August 2013 21:07:06 UTC