W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: [css3-flexbox] Best way to denote flexible lengths

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 13 Apr 2011 13:29:08 -0700
Message-ID: <BANLkTinmBSPwPffVXjnDUEG5iZyUzp7mWg@mail.gmail.com>
To: Alex Mogilevsky <alexmog@microsoft.com>
Cc: www-style list <www-style@w3.org>
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
Received on Wednesday, 13 April 2011 20:29:58 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:39 GMT