Skip to content

[css-sizing] Computing min-width/min-height: auto to zero #2230

@fantasai

Description

@fantasai

When exactly does 'auto' compute to zero?

http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0A%20%20html%20%7B%20display%3A%20flex%3B%20%7D%0A%3C%2Fstyle%3E%0ATest%0A%3Cscript%3E%0A%20%20w(window.getComputedStyle(document.body%2C%20null).getPropertyValue(%27min-height%27))%3B%0A%3C%2Fscript%3E

The wording in Flexbox https://www.w3.org/TR/css-flexbox-1/#min-size-auto isn't particularly clear.

On a flex item whose overflow is visible in the main axis, when specified on the flex item’s main-axis min-size property, specifies an automatic minimum size. It otherwise computes to 0 (unless otherwise defined by a future specification).

Does it compute to zero

  • on flex items, in the main axis, when 'overflow' is visible?
  • on flex items, in the main axis, always? (Firefox does this)
  • on flex items, in both axes? (Chrome does this)

We should probably bias towards computing to auto in as many cases as is Web-compatible, but we should also fix the spec to say exactly what happens.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions