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