Open Bug 1238654 Opened 9 years ago Updated 2 years ago

Unexpected text wrap if parent with shrink-wrap (or preferred) width (e.g. inline-block) has a floated child

Categories

(Core :: Layout: Block and Inline, defect)

43 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: vertova, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file Test case
I have run into issues involving a parent with an intrinsic width (table, float, inline-block etc.) and a floated child. Text within the parent and outside of the float is wrapped or flowed unexpectedly in Firefox. See the attached test cases. I am not sure if this depends on other open bugs, in doubt I have included references in the test case to possibly related bugs.
The basic question here is actually what the shrink-wrap width of the parent is, and that's determined by the parent's preferred width. Blocks and a <br> both induce a "contribute to intrinsic width and forget what you had" operation that makes sense for inlines but not necessarily for floats. On the other hand, the <br> case totally depends on whether the float is taller than the vertical gap inserted by the <br>, which you can't even know in general at intrinsic width computation time.... It might be possible to change something about the float-next-to-block case, though again it really depends on the height of the float, and worse yet the height of the blocks. That is, which exact blocks should know that they intersect a float during intrinsic width computation, and how do they know that? What's really needed here is an actual spec, not flailing around changing from one behavior to another without having a long-term plan. :(
Component: Layout: Floats → Layout: Block and Inline
Summary: Unexpected text wrap if parent with intrinsic width has a floated child → Unexpected text wrap if parent with shrink-wrap (or preferred) width has a floated child
Firefox, chrome and Edge get same results. IE11 is only different.
Attached file Overflow hidden
This seems to display differently in FF and Chrome. But, if it is a bug, the description I gave to this bug report should be changed. Sorry for the confusion.
Keywords: testcase
Summary: Unexpected text wrap if parent with shrink-wrap (or preferred) width has a floated child → Unexpected text wrap if parent with shrink-wrap (or preferred) width (e.g. inline-block) has a floated child
Attachment #8707075 - Attachment mime type: text/plain → text/html
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: