You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The specification on anonymous block boxes states that if a block container contains a block-level box, it is forced to only contain block-level boxes by wrapping any inline-level content in anonymous block boxes.
The text "inline content" should be wrapped in an anonymous block-level box because of its inline nature.
The anonymous block-level box should be positioned on its own line below block-level-box.
According to the spec, in the float model, floated boxes are laid out in normal flow first. The floated-box should then appear right below the anonymous block-level box.
Actual behavior (In both Chrome and Firefox):
The floated-box div appears immediately below the block-level-box.
The anonymous block-level box wrapping the text "inline-content" is placed adjacent to the right of the floated-box, on the same line.
Could the spec be clarified to better define the expected behavior of anonymous block-level boxes in the presence of floats? The current behavior in Chrome and Firefox appears to contradict the specification.
The text was updated successfully, but these errors were encountered:
The text "inline content" should be wrapped in an anonymous block-level box because of its inline nature.
Yes, but the float is also placed inside this this anonymous block. Since it's out-of-flow it doesn't break the sequence of inline-level contents.
Or at least that's how we did it in Servo. (We just happen to match your expectation because the intrinsic sizes of an inline formatting context don't handle floats well, but we match other browsers if the container is wide enough)
Yes, but the float is also placed inside this this anonymous block.
If there are multiple floated boxes, are they all supposed to be placed inside the first anonymous block box that precedes them? What happens if inline content is placed between floats in this case? Does each sequence of floats get assigned to the anonymous block box that immediately precedes them?
The specification on anonymous block boxes states that if a block container contains a block-level box, it is forced to only contain block-level boxes by wrapping any inline-level content in anonymous block boxes.
The specification on positioning schemes explains that in the float model:
The spec on floats further clarifies:
Example scenario:
Expected behavior:
anonymous block-level box
because of its inline nature.anonymous block-level box
should be positioned on its own line belowblock-level-box
.floated-box
should then appear right below theanonymous block-level box
.Actual behavior (In both Chrome and Firefox):
floated-box
div appears immediately below theblock-level-box
.anonymous block-level box
wrapping the text "inline-content" is placed adjacent to the right of thefloated-box
, on the same line.Could the spec be clarified to better define the expected behavior of anonymous block-level boxes in the presence of floats? The current behavior in Chrome and Firefox appears to contradict the specification.
The text was updated successfully, but these errors were encountered: