Skip to content

[css2.2] Suggestion: Clarify the conditional reflow behavior for floats #12553

@kannanwisen

Description

@kannanwisen

Hello CSS Working Group,

This issue is to suggest a clarification for a sentence in the CSS 2 specification, section 9.5.1, concerning the placement of floats next to preceding inline content.

The current text states:

...if inline-level boxes are placed on the line before a left float is encountered that fits in the remaining line box space, the left float is placed on that line, aligned with the top of the line box, and then the inline-level boxes already on the line are moved accordingly to the right of the float...

While this sentence is technically correct, its structure is very dense and can be difficult for developers to parse. The critical conditional nature of this rule—that the reflow only happens if the float fits—is embedded within a long clause, which can be easily missed.

Proposal for Clarification

To improve readability and prevent misinterpretation, I suggest restructuring this sentence to more explicitly separate the condition from the action.

For example, the logic could be presented more clearly like this:

...when a left float is encountered after inline-level boxes have been placed on the current line, the browser first determines if the float can fit in the remaining horizontal space.
  • If the float fits: It is placed on that line, and the preceding inline-level boxes are reflowed into the space to its right.
  • If the float does not fit: It is moved down to the next available line.

This is just a suggestion for the structure. The main goal is to make the "if" condition more explicit, which would greatly improve the clarity of this fundamental and complex part of the float placement algorithm.

Thank you for your consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions