Re: [css3-flex] calc(flex) and concept of free space.

On Mon, May 31, 2010 at 8:26 PM, Andrew Fedoniouk
<news@terrainformatica.com> wrote:
> Terribly sorry. Forgot to add box-sizing:border-box there.
> So the question looks like:
>
> <div width:1000px padding-left:1fx box-sizing:border-box>
>  <div width:calc(500px + 1fx) />
> </div>
> What would be the width of inner div?
> In other words what exactly that preferred width means?

(Assuming that the outer div is a flexbox, but not a child of another flexbox.)

The inner div is 500px.  Read section 6.2 of my proposal for the
precise details.  The outer div's flex gets distributed in the first
round, the child's flex is distributed in the second round.  When
distributing space, you compute free space by looking at the "preflex
lengths" of the children.  That's 500px in this case, so there's 500px
of free space that the outer div's padding can soak up.


> Another question:
>
> <div width:1000px box-sizing:content-box>
>  <div #flexible width:calc(500px + 1fx) >
>      <div width:800px />
>  </div>
> </div>
>
> What would be the width of div#flexible ?

#flexible is 1000px wide.  Perhaps you left something out of this
example?  As written, it's completely trivial, and doesn't illustrate
anything useful regarding table cells.

~TJ

Received on Tuesday, 1 June 2010 05:53:59 UTC