Skip to content

[css-display-3] Can the root float? #8196

Open

Description

@fantasai

In #8095 we established that:

  • the root establishes an independent formatting context
  • the ICB establishes a block formatting context (thus an in-flow root is a block-level box)

This fully defines the root box’s layout.

However, we noted that some implementations don't handle float on the root element, so we have a question: should float apply to the root element? If not, is that a used value of none or do we compute it to none?

Current testing shows that Blink and Webkit can float the root, and Gecko can't. Also, among the print implementations some support float, some don't, and some don't have proper block layout on the root

Activity

  1. bfgeek commented on Sep 11, 2023

    @bfgeek

    My (strong) preference here is that the ICB layout context should contain minimal "special" logic. E.g. if somebody wants to float the root - let it float!

  2. astearns commented on Mar 4, 2024

    @astearns
    Member

    @emilio would Gecko have any concerns with specifying that the root can float?

  3. emilio commented on Mar 4, 2024

    @emilio
    Collaborator

    Not in principle, though I don't have the context for that limitation. Maybe @dbaron does?

  4. Loirooriol commented on Oct 6, 2025

    @Loirooriol
    Contributor

    Servo and Ladybird allow it to float.

  5. Psychpsyo commented on Mar 23, 2026

    @Psychpsyo
    Contributor

    Note that CSS2 currently has this line:

    User agents may treat float as 'none' on the root element.

  6. added and removed
    Agenda+ LaterLower-priority items that are flagged for CSSWG discussion
    on Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions