Skip to content

[css-flexbox] Clarify whether unresolvable percentages prevent stretching? #4312

Closed
@cbiesinger

Description

@cbiesinger

https://drafts.csswg.org/css-flexbox/#valdef-align-items-stretch

If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched

Combined with:
https://drafts.csswg.org/css2/visudet.html#the-height-property

the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the value computes to 'auto'.

So I just wanted to verify that the item should still stretch in a case like this:

<div style="display: flex;">
  <div style="height: 100%; background: green"></div>
  <div style="height: 200px;"></div>
<div>

Note that neither Chrome nor Firefox currently stretch the item.

@dholbert @fantasai @tabatkins @davidsgrogan

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