W3C home > Mailing lists > Public > www-style@w3.org > October 2013

Re: Displaying an ellipsis on the last visible line of a block that overflows vertically

From: Bruno Racineux <bruno@hexanet.net>
Date: Mon, 28 Oct 2013 20:28:49 -0700
To: Marat Tanalin <mtanalin@yandex.ru>, "robert@ocallahan.org" <robert@ocallahan.org>, www-style <www-style@w3.org>
Message-ID: <CE9463A6.78468%bruno@hexanet.net>


On 10/27/13 3:39 AM, "Marat Tanalin" <mtanalin@yandex.ru> wrote:

>27.10.2013, 05:57, "Robert O'Callahan" <robert@ocallahan.org>:
>> I've had two requests for this just in the last week.
>>
>> Seems to me it would be easy to add a 'text-overflow-last' property
>>with the same values as text-overflow. When a block has
>>text-overflow-last not 'clip', and its 'overflow' is not 'visible', and
>>it has one or more lines overflowing vertically, the last line that
>>fully fits in the block (or the first line, if there is no line that
>>fully fits in the block) gets an overflow indicator according to the
>>value of 'text-overflow-last' and the content of any later lines is
>>hidden as if they're clipped out. If a line gets a text-overflow-last
>>indicator, it cannot also get a text-overflow indicator.
>>
>> Rob
>
>FWIW, here is a directly related proposal by me:
>
>http://lists.w3.org/Archives/Public/www-style/2012Jan/0627.html

What I am thinking would also be useful, is to have an inline ellipsis, if
that's possible with css.

The use case I encountered is:
Wanting to add a [Read more] link at the end of a multiline description of
a headline, yet keep the amount of lines consistent by preventing the read
link to add add a new line.

e.g.

  ARRI Announces New AMIRA
  Documentary Style Camera at IBC <-- headline title
  ARRI introduces AMIRA, a new documentary-style
  camera [...] shoulder-mounted operation. [Read] <-- link


I currently have it this way instead:

  ARRI Announces New AMIRA
  Documentary Style Camera at IBC <-- headline title
  ARRI introduces AMIRA, a new documentary-style
  camera that combines high image quality... [Read] <-- link


With responsive design, the number of lines shown could adapt depending on
the device with the ability to keep the [Read] link "inline", and always
"at the end of the line".

If that makes sense.
Received on Tuesday, 29 October 2013 03:29:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 29 October 2013 03:29:19 UTC