# Re: [css3-flexbox] question about calculating "hypothetical main size"

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 28 Jun 2012 17:24:56 -0700
Message-ID: <CAAWBYDDkyeJ3K5hmiEVdrYWYQKGw6Vh1Qi0fF__FEe2r60KGDQ@mail.gmail.com>
To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
Cc: WWW Style <www-style@w3.org>
```On Thu, Jun 28, 2012 at 7:18 AM, Kang-Hao (Kenny) Lu
<kennyluck@csail.mit.edu> wrote:
> I am having trouble understanding the algorithm here, and I'll
> appreciate some help, for example, a pointer to a previous discussion.

We're having trouble understanding what we were trying to say too, so
you're not alone.

> 9.2. Line Length Determination
>
>  # 3. Determine the flex base size and hypothetical main size of each
>  # item:
>  #
>  # ...
>  #    Otherwise, if the flex container's main-axis is parallel to the
>  # item's inline-axis, lay out the item using the available space and
>  # its flex basis if the item is inflexible,
>
> Question 1: What does use the available space *and* its flex basis mean?
> Using its flex basis as the available space? Using the maximum of
> available space from the flex container and the flex basis?

Yeah, we need to clarify this.

> Question 2: What is the flex base size of
>
> <div style="display: flex; width: fit-content"><!--floated container-->
>  <div style="flex: 0 0 50%;">
>  </div>
> </div>
>
> The flex item is inflexible and the percentage is resolved against an
> flex container with indefinite width and hence indefinite by definition.
> How do you resolve 50% at this point?

That's undefined per 2.1.  We need to fix this for *all* display types.

>  # or ‘auto’ otherwise, treating ‘auto’ as ‘max-content’...
>  # If the flex basis is ‘fill-available’, or ‘fit-content’, and
>  # the flex container is being sized under a min-content or
>  # max-content main-size constraint, size the item under that
>  # constraint instead. The flex base size is the item's resulting
>  # measure.
>
> Question 3: What does "sized under a min-content or max-content
> main-size constraint" mean? What are the examples besides "width:
> min-content" and "width: max-content" on the flex container?

Those terms are defined in a commented out section of the algorithm.
We're not sure where to put the definitions; they're applicable to a
lot more than just Flexbox. We definitely need to do something about
this, though.

~TJ
```
Received on Friday, 29 June 2012 00:25:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:00 UTC