Skip to content

[css-contain] contain:layout incorrectly claims "nothing outside can affect its internal layout" #3357

@cbiesinger

Description

@cbiesinger

https://www.w3.org/TR/css-contain-1/#valdef-contain-layout

layout
This value turns on layout containment for the element. This ensures that the containing element is totally
opaque for layout purposes; nothing outside can affect its internal layout, and vice versa.

However, I can't find anything in the description of contain: layout that disallows sizing to the available space (<div style="width: auto">) or fit-content sizing. So the inline-size of the containing element, in the common case, depends on the size of its parent.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions