Re: [csswg-drafts] [css-overflow] Consider support for multiple-line ellipsis

...shit, I totally misunderstood this feature. It *is* almost exactly what fantasai suggests; it just calculates the natural height (`height: auto;`) based on only looking at N lines.

(To be precise, it appears to do this "pretend it's only got N lines of content for height-determination purposes" for each block of inline content in the element independently; break up the inline content with another block, and both the preceding and following will be clamped to N lines.  See <http://software.hixie.ch/utilities/js/live-dom-viewer/saved/5310> for a demonstration.)

I was under the impression that it actually suppressed fragment generation for everything after the Nth line, which is *actually useful* in a lot of ways.  As it is, you have to use `overflow` anyway, or else the lines after the clamp will just visibly overflow!

@fantasai, sorry for misleading you yesterday in our discussion over this. :(

> it requires display: -webkit-box and -webkit-box-orient: vertical to be set as well, or it does not take effect (wtf?)

It's a hack built on top of our old Flexbox implementation. Blame Hyatt. ^_^

---------

Okay, so that brings us to a conundrum: how much of the current behavior do we want to preserve?  In particular, is the "apply clamping separately to each inline formatting context child" behavior required and/or desired, or would we prefer to just spec that it applies only to the first such one, or perhaps that it continues its count across inline formatting contexts?

> We can just imply that the current limited ellipsis is the result of something like a max-lines-ellipsis property being auto (and possibly also introduce a none value while we're at it), and that whatever alternative better system we come up later will just build from there.

Yes, I think that's good enough for now. Proper block-flow ellipsis is a hard problem that we need to solve at some point, but there's no reason to block this on having that solved.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/390#issuecomment-323418944 using your GitHub account

Received on Friday, 18 August 2017 17:51:31 UTC