Closed
Bug 1177986
Opened 9 years ago
Closed 5 years ago
block with whites-space:nowrap ends up with its text sticking out when it follows a float in a shrink-wrap container
Categories
(Core :: Layout: Floats, defect)
Core
Layout: Floats
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: sander, Unassigned, NeedInfo)
Details
Attachments
(1 file)
215 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36 Steps to reproduce: The width of a flexbox item containing a floating element followed by an element with white-space: nowrap is not calculated correctly. It seems that the width of the floating element is not added to the total width needed by both elements. A fiddle @ http://jsfiddle.net/ux94dc82/ to illustrates the problem. Actual results: Flexbox doesn't grow wide enough to accommodate both paragraphs. Expected results: It should be as wide as the first and second paragraph combined. It feels like the calculation is off because the second paragraph is stretched by the white-space: nowrap property, but that's just a hunch.
Updated•9 years ago
|
Component: Untriaged → Layout: Floats
Product: Firefox → Core
Version: 38 Branch → Trunk
Comment 1•9 years ago
|
||
So the issue is that we determine the width of the shrink-wrap thing as the max of the width of the unwrappable block and the float, but then don't clear the block past the float (because nothing really prevents the block from shrinking below its intrinsic width in this testcase, so that's exactly what it does). A simpler testcase not involving flexbox at all: <style> div { border: 1px solid red; float: left; } p:first-child { float: left; } p { white-space: nowrap; border: 1px solid blue} </style> <div> <p>Some</p> <p>long text</p> </div> David, do we have an existing bug on this that you know of?
Flags: needinfo?(dbaron)
Summary: Flexbox width is incorrect when containing floating elements → block with whites-space:nowrap ends up with its text sticking out when it follows a float in a shrink-wrap container
Comment 2•9 years ago
|
||
(Here's a live version of bz's testcase, FWIW.)
Comment 3•5 years ago
|
||
2019-03-06
This bug is part of a group of bugs which have had an open needinfo for at least 12 weeks.
The request for information has not been answered, and we can't move forward on the bug so we are closing it.
If the defect is still present, please reopen this bug with an updated report.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•