-webkit-line-clamp with a single flex item not quite interoperable.
Categories
(Core :: Layout, defect, P3)
Tracking
()
People
(Reporter: emilio, Unassigned)
References
Details
Attachments
(2 files)
The following test-case that I constructed while trying to reduce bug 1551065 renders differently than WebKit.
Reporter | ||
Comment 1•5 years ago
|
||
Is this intentional / known Cam? Seems like Blink's line-clamp doesn't work quite as our line-clamp, since the clamped lines still affect the sizing of the flex container.
Comment 2•5 years ago
|
||
The issue seems to be whether to generate -webkit-box items for white space that is a direct child of the -webkit-box container, when the white space normally shouldn't be collapsed away (as with white-space: pre
). The effect is that Blink generates more lines, which is why it's affecting -webkit-line-clamp.
Daniel, is this a known difference between our -webkit-box implementation and Blink/WebKit's? Is this something we should fix?
Comment 3•5 years ago
•
|
||
(In reply to Cameron McCormack (:heycam) from comment #2)
Daniel, is this a known difference between our -webkit-box implementation and Blink/WebKit's? Is this something we should fix?
No, I don't think it's a known difference.
Yes, it's probably something we should fix. In case I don't get to it and someone else wants to take a look: we probably need a special case in nsCSSFrameConstructor::FrameConstructionItem::NeedsAnonFlexOrGridItem()
, for the aIsLegacyBox==true case.
https://searchfox.org/mozilla-central/rev/8308eb7ea14318f53b55f3289c2bb9b712265318/layout/base/nsCSSFrameConstructor.cpp#11781
(Or, if the whitespace has already been discarded by that point and the function doesn't even get to consider it, then perhaps we need a special case up a few levels in nsCSSFrameConstructor::CreateNeededAnonFlexOrGridItems
or nearby.)
Updated•5 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 4•1 year ago
|
||
We made line-clamp work with blocks which fixed this.
Description
•