Re: [css-flexbox] max-content contribution not defined for flex items

On 08/21/2015 02:32 PM, Christian Biesinger wrote:
> General thought: Since we generally use flex-basis instead of width
> (/height) in Flexbox, we should do that also for the intrinsic sizing
> computation. That is, "flex-direction: row; flex-basis: 50px; width:
> auto;" should produce the same intrinsic main size as "flex-direction:
> row; width: 50px;".

I think that's not quite in line with what fantasai was suggesting. A
few clarifications:

 1) The goal here is to make sure each item is at least as large as its
(clamped) intrinsic [min|max]-content size. And its [min|max]-content
size is *only* dependent on its contents -- not its 'width' or its
'flex-basis' or anything else.

 2) So: the flex item's 'width' does *not* directly influence this
computation at all.  (Except maybe a little, indirectly, via
'flex-basis:auto' or 'min-width:auto'.)

 3) *Also*: the item's 'flex-basis' does *not* establish its min-content
contribution.  It only comes into play as a parameter that we use to
reverse-engineer the flex layout algorithm to try to achieve the item's
*actual* [min|max]-content size.  (Basically, we see how far each item
has to flex from its flex-basis to reach its [min|max]-content size --
and then we pick conditions such that the flex layout algorithm can flex
each item to be at least that large.)

Does that clarify things?

Received on Friday, 21 August 2015 21:58:16 UTC