Re: [css-flexbox] Computation Algorithm

  ----- Original Message ----- 
  From: Robert O'Callahan 
  To: Andrew Fedoniouk 
  Cc: Tab Atkins Jr. ; www-style@w3.org 
  Sent: Monday, May 10, 2010 11:06 PM
  Subject: Re: [css-flexbox] Computation Algorithm


  The intuition is not hard:
  1) every element has a preferred width

That is where my CSS intuition fails. What would be that "preferred width" in terms of CSS?
We have declared, used, computed... 

It appears as min-intrinsic width is misteriously involved in your preferred width calculations.
But how is it in principle related to flexes?

ElementA: "AAAAAAAA"
ElementB: "BBBB BBBB BBBB BBBB"

Why preferred width of elementA should be larger than of elementB?



  2) if the preferred widths add up to less than the width of the container, the leftover width is allocated to the children in proportion to their box-flex values
  3) if the preferred widths add up to more than the width of the container, the excess width is taken away from the children in proportion to their box-flex values
  I don't think this is difficult for authors to understand.


That is quite diferent from XUL flex definition:
https://developer.mozilla.org/en/XUL/Attribute/flex
no?

Anyway web designer first question: how to make one element twice wider than another?
Does your FlexBox have an answer on this?
 
I'd have to talk to XUL developers more to understand how this concept of preferred width is useful to them. I'll blog and see if I can get some to turn up here.

Andrew Fedoniouk. 

Received on Tuesday, 11 May 2010 07:23:48 UTC