- From: kannanwisen via GitHub <noreply@w3.org>
- Date: Thu, 31 Jul 2025 08:31:01 +0000
- To: public-css-archive@w3.org
kannanwisen has just created a new issue for https://github.com/w3c/csswg-drafts: == [css2.2] Suggestion: Clarify float placement for "inline -> float -> inline" source order == Hello CSS Working Group, This issue is to suggest a clarification for the float placement algorithm in the CSS 2 specification, section 9.5.1. The current text describes the behavior for floats preceded by inline content (the "reflow" rule) and floats followed by inline content (the "wrapping" rule), but it does not explicitly define the interaction when both occur together. This specific source order (inline content -> float -> inline content) results in a nuanced behavior that is not a simple combination of the other two cases and can be a source of confusion. **The Nuance: Continuity of the Line Box** The subtle but critical behavior is that the browser re-uses the same shortened line box for the content that comes after the float as it does for the content that was reflowed from before the float. A developer might logically assume that the browser reflows the first piece of text, places the float, and then starts a new line box for the subsequent text. However, the actual behavior is that both pieces of text are flowed into the same continuous, shortened line box. This makes this case non-redundant and worthy of its own explicit explanation. **Proposal for Clarification** To improve the clarity of the specification, I suggest adding a dedicated paragraph or an illustrative example that explicitly describes the outcome of the inline -> float -> inline source order. An example of what this clarification could look like: When a float is preceded and followed by inline-level content on the same line, the float is placed, and the preceding inline content is reflowed into the available space to its side. The subsequent inline content is then placed into the same shortened line box, immediately following the reflowed content. Adding this clarification would make the specification much clearer for developers and prevent misinterpretation of this fundamental layout behavior. Thank you for your consideration. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12554 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 31 July 2025 08:31:02 UTC