Skip to content

[css-sizing-3]? Implicit minimum block-size for editable elements #8800

Open

Description

@tabatkins

Context: #7542 (comment)

When an element is editable (via contenteditable, currently), browsers apply an implicit minimum height (1lh of content-box height) to ensure that the element can have a line of text inserted when you click into it. It seems that this is interoperable for display:block and other inline-containing display types; Chrome and WebKit additionally apply this for flex and grid.

We should document this, and establish exactly what conditions cause it to apply.

Activity

  1. tabatkins commented on Sep 3, 2026

    @tabatkins
    MemberAuthor

    It looks like this needs to be done "magically". Based on some quick testing, the 1lh min appears to apply when the editable root establishes an inline formatting context. An inline child doesn't block this, but a block child does (as it causes the root to establish a BFC instead), and nested contenteditable doesn't matter.

    https://software.hixie.ch/utilities/js/live-dom-viewer/saved/14854

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions