Skip to content

[css-flexbox] Should automatic minimum size check scrollability in the main axis or both? #12650

@Loirooriol

Description

@Loirooriol

https://drafts.csswg.org/css-flexbox/#min-size-auto

the used value of a main axis automatic minimum size on a flex item whose computed overflow value is non-scrollable is [...]

#12289 allows overflow to be scrollable in one axis but not the other, so we need to decide if the above will only check the main axis, or whether we still want to check both.

<!DOCTYPE html>
<style>body > div { display: flex; width: 0; white-space: nowrap }</style>
Has automatic minimum size:
<div>
  <div style="overflow: clip; border: solid">...</div>
</div>
Automatic minimum size is zero:
<div>
  <div style="overflow: hidden; border: solid">...</div>
</div>
Automatic minimum size was zero. What now?
<div>
  <div style="overflow: clip hidden; border: solid">...</div>
</div>

I'm leaning towards just checking the main axis.

Note that WebKit isn't following the spec: it zeroes out the automatic minimum size if overflow is not visible in the main axis. So I don't think we are constrained by web compat.

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