On Wed, Mar 9, 2011 at 12:22 PM, Alex Mogilevsky <alexmog@microsoft.com> wrote:
> There is *also* a viable option to not have flex() function at all and use 'auto' as equivalent of 'flex(1)' for properties other than width and height where flex is applicable. That will of course require that padding takes 'auto', and that will not allow for flexible padding with min value -- but it would be much much easier to use.
>
> We have previously discussed an approach with no flex() function but auto==flex(1). I am not sure it was ever formally written down though, was it? It will really help to have a representative set of use cases at one place, like http://dev.w3.org/csswg/css3-gcpm/uc.html .
So far I've gone with the approach that only width/height can accept
the flex() function; margins and paddings are made flexible by the
'auto' value.
However, flexible padding may not be the way we want to address this.
It's really only useful in the item's length/extent axis - for
example, in english text it's not really useful to have flexible
left/right padding.
I've been discussing this with fantasai, and she hit upon the idea of
exposing a box-align property which simply acts analogously to
vertical-align on table cells, like people have been asking for
forever. It turns the element into a BFC and, if there's any free
space in the length axis, aligns the contents appropriately. It would
be applicable to all elements, and in the case of flexbox specifically
would accomplish the same thing that I was going to make padding:auto
do.
What do you think?
~TJ