Re: [css-ui] text-overflow: fade ?

On Oct 4, 2013, at 12:15 AM, Alan Gresley <alan@css-class.com> wrote:

> On 4/10/2013 2:52 PM, Brad Kemper wrote:
>>> On Oct 3, 2013, at 4:44 PM, "Tab Atkins Jr." <jackalmage@gmail.com>
>>> wrote:
>>> 
>>>> On Thu, Oct 3, 2013 at 4:15 PM, Rik Cabanier <cabanier@gmail.com>
>>>> wrote: This sounds like a new pseudo-class ':overflow' :-)
>>> 
>>> Nah, text-overflow is per-line, not per-element.
>> 
>> It could be pseudo element representing the last visible em-length of
>> the overflowing line. Just like 'first-letter' selects part of a line
>> (well, not exactly the same, as ::overflow would not be based on
>> glyph boundaries).
> 
> This can't be a pseudo element.

Sure it can. Open your mind. 

> It's simply decoration for text that is overflowing

No, it is decoration for a line that is overflowing. The overflowed text is hidden. 

> and when nothing is overflowing, there is no decoration.

If there is no text in an element or its descendants, then ::first-letter doesn't style anything either. Pseudo-elements like first-letter and first-line select things that are otherwise not selectable. In this case, the pseudo-element would select line boxes that are overflowing (or maybe just the ends of such line boxes). 

> It the same as ellipses. For ::first-letter, you don't style when a word reaches 10 glyphs long and not style when the word is only 5 glyphs long.

That's because that is how first-letter is defined. But there are conditions. You style a glyph when it is the first in the element, and not when it is in any other position. The conditions for when to style a line box (or the end of a line box) would be different for ::overflow (or whatever we call it) than for the conditions of when to style a line box with ::first-line, for instance. In both cases, a line-box gets styled based on some aspect of that line box. 

Received on Friday, 4 October 2013 16:43:10 UTC