Skip to content

[css-flexbox][css-grid] Automatic minimum size on replaced element with overflow different than visible/clip #8502

@Loirooriol

Description

@Loirooriol

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

<div style="display: flex; width: 50px;">
  <canvas width="1" height="1" style="background: blue; height: 100px; overflow: visible"></canvas>
</div>
<div style="display: flex; width: 50px;">
  <canvas width="1" height="1" style="background: cyan; height: 100px; overflow: scroll"></canvas>
</div>

There is interoperability that in the 1st case the automatic minimum size makes the flex item be 100px, and in the 2nd case the automatic minimum size is avoided due to overflow: scroll.

However, https://drafts.csswg.org/css-flexbox-1/#min-size-auto says "a flex item that is not a scroll container". And the <canvas> is replaced, so it's not really a scroll container?

Should the spec check the computed value of overflow-x/y instead of being a scroll container? Should browsers change?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.css-flexbox-1Current Workcss-grid-2Subgrid; Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions