[csswg-drafts] [css-flexbox] should a definite flex-basis always make the main size be definite? (#4311)

cbiesinger has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-flexbox] should a definite flex-basis always make the main size be definite? ==
https://drafts.csswg.org/css-flexbox/#definite-sizes

Currently, a main size is only made definite if the flex container has a definite height.

However, browsers do not quite implement that. See https://crbug.com/1003506 for some discussion, but basically:

```html
<div style="display: flex; flex-direction: column; width: 100px; background: yellow;">
  <div style="height: 100px; flex: 1 1 auto; background: green; min-height: 0;">
    <div style="height: 100%; background: red;"></div>
  </div>
</div>
```

An element that would have a definite height outside of flex now suddenly has an indefinite height when put in a flexbox, because it's flexible (at least according to the spec, not in impls).

- Should that change?
- Would implementing this spec-compliant be web-compatible?

Also note that Chrome currently resolves percentages only if the main size property is definite; a definite flex-basis is not enough. That should probably be changed.

@dholbert @fantasai @tabatkins 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4311 using your GitHub account

Received on Monday, 16 September 2019 02:28:24 UTC