Implement "continue: discard" (possibly as a prototype for limited usage in frontend code)
Categories
(Core :: Layout: Block and Inline, enhancement)
Tracking
()
People
(Reporter: dholbert, Unassigned)
References
Details
Once we've landed the refactor in bug 1786147, we should consider prototyping continue:discard (and/or -webkit-discard) as an extension to our -webkit-line-clamp compatibility feature.
No other browser has that implemented at this point[1], but our frontend team does have a need for it; see bug 1787871. So it's possible we could implement a somewhat-nerfed version (if needed) with well-understood limitations (e.g. no marquees animating stuff into/out-of the overflowing text, etc :)) for use in frontend code only for now.
I'm hesitant to make this a hard blocker to bug 1787871 / Firefox View for now, but I'm associating it with that bug to track the relationship at least, since this is one thing that could help fix that bug.
| Reporter | ||
Comment 1•4 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0)
No other browser has that implemented at this point[1]
[1] though Chromium folks may (?) be working on this in bug https://bugs.chromium.org/p/chromium/issues/detail?id=1321518
Comment 2•4 years ago
|
||
We are "thinking" about it. We need to do something relatively complex to pull it off correct - might be able to do it next year maybe...
| Reporter | ||
Comment 3•4 years ago
|
||
Thanks, Ian! That's helpful. Followup question for you...
Emilio and I are wondering if it'd be safe to just suppress painting (e.g. apply visibility:hidden) to webkit-line-clamp'ed lines. We suspect this is what authors already intend to happen; they for any of the "clamped" lines to show up (nothing after the ellipsis).
As a concrete example, this proposal would prevent lines "d, e, f" from painting here (where there's line-clamping but no explicit clipping):
data:text/html,
<div style="display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; border: 1px solid black">
a<br>b<br>c<br>d<br>e<br>f<br>
...and prevent "d" from painting here (where there's overflow:hidden clipping but also some padding that allows part of d to be visible):
data:text/html,<div style="display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3;
border: 1px solid black; padding: 0.5em; overflow: hidden">
a<br>b<br>c<br>d
I'm wondering if you happened to consider & explore the webcompat impacts of making a change like that, as part of the investigation you referenced in bug 1786147 comment 10. (It seems to be what authors would intuitively expect, so I would hope it'd be a safe change & would produce results that are strictly closer to what authors are expecting/intending. But, the web is weird, so I'm not sure. :))
Comment 4•4 years ago
|
||
FWIW I filed https://github.com/w3c/csswg-drafts/issues/7708 on something related to that.
Updated•4 years ago
|
Comment 5•2 years ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.
For more information, please visit BugBot documentation.
Description
•