PSA: Removing legacy -webkit-line-clamp trailing anchor behavior

281 views
Skip to first unread message

Walter Korman

unread,
Apr 7, 2015, 2:18:24 PM4/7/15
to blin...@chromium.org, Chris Harrelson, Ojan Vafai
Hello blink-dev,

We are removing legacy behavior where -webkit-line-clamp special-cased a trailing anchor, if any, to always be painted and hit-tested. Trailing anchors will now behave like any other content in the box. Ellipsification logic is otherwise unchanged.

In addition to causing implementation complexity for Blink, authors generally use this property to achieve multiline ellipsis and actively don't want the special trailing anchor behavior. An example display issue likely related to this: http://stackoverflow.com/questions/25502628/webkit-line-clamp-truncates-link-in-the-middle

More detail:

Christian Biesinger

unread,
Apr 8, 2015, 4:09:15 PM4/8/15
to Walter Korman, blink-dev, Ojan Vafai, Chris Harrelson

I'd really be much happier if we did not fix this. Line clamp requires the deprecated flex box implementation (-webkit-box), and I'd much rather remove it than improve it.

-christian

Christian Biesinger

unread,
Apr 8, 2015, 4:11:43 PM4/8/15
to Walter Korman, blink-dev, Chris Harrelson, Ojan Vafai

Ah, looking at the patch I see that this simplifies code outside of LayoutDeprecatedFlexbox. I withdraw my objection then.

PhistucK

unread,
Apr 8, 2015, 4:15:58 PM4/8/15
to Christian Biesinger, Walter Korman, blink-dev, Ojan Vafai, Chris Harrelson
And on the same note, implementing text-overflow-last (or whatever) that basically does multiple line ellipsis (à la -o-ellipsis-lastline) would be much preferred and this old property should just be deprecated and removed (once usage settles down).


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Paul Irish

unread,
Apr 8, 2015, 7:29:28 PM4/8/15
to PhistucK, Christian Biesinger, Walter Korman, blink-dev, Ojan Vafai, Chris Harrelson
On Wed, Apr 8, 2015 at 1:15 PM, PhistucK <phis...@gmail.com> wrote:
And on the same note, implementing text-overflow-last (or whatever) that basically does multiple line ellipsis (à la -o-ellipsis-lastline) would be much preferred


Just looked it up.…

text-overflow: -o-ellipsis-lastline;
Wow, that is really really good looking. Polyfill and explanation here.

There's a massive amount of JS out there slowing down pages to do this. 


It appears there's been discussion in CSS WG on this, most recently in 2013.
Has anything moved since then?
 

PhistucK

unread,
Apr 9, 2015, 3:04:59 AM4/9/15
to Paul Irish, Christian Biesinger, Walter Korman, blink-dev, Ojan Vafai, Chris Harrelson
Forget about the massive amount of JavaScript, things are done server side with no accuracy (making the server render text in a certain size and cut according to the rendered dimensions is just wasteful or too much work), in a lot of cases. :(
This is such a good feature that is simply missing and full of inaccurate or nonstandard hacks at the moment...

If you could champion this, that would be great. :)


PhistucK
Reply all
Reply to author
Forward
0 new messages