W3C home > Mailing lists > Public > www-style@w3.org > June 2012

Re: [css3-flexbox] flex-grow initial value should be 0px

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 4 Jun 2012 10:29:24 -0700
Message-ID: <CAAWBYDAbASP5zvM9fiqsstNK5HDZa3A0vLnzeifo2oY6OrQUrA@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
On Wed, May 30, 2012 at 10:57 PM, fantasai
<fantasai.lists@inkedblade.net> wrote:
>  Proposal A: ''flex: none'' (discarded at Hamburg)
>     * It's easier to use alignment and auto margins
>     * Easier for use cases that want some but not most items flexible,
>       e.g. one item takes up all free space
>     - Doesn't have negative flexibility be default, which could help
>       prevent overflow in many cases
>     - Inconsistent with 'stretch' default in cross-dimension
>
>  Proposal B: ''flex: auto'' (adopted at Hamburg)
>     + Negative flex is on by default, preventing overflow in many cases
>     + Consistent with 'stretch' default in cross-dimension
>     - Harder to use alignment and margins, since have to turn off flex first
>     - More work for use cases that want most items inflexible
>
>  Proposal C: ''flex: 0 1 auto'' (proposed here)
>     + Negative flex is on by default, preventing overflow in many cases
>     + Easy to use alignment and auto margins since positive free space is
> not flexed
>     + Easy for use cases where free space is distributed to e.g. only one
> item
>     - Inconsistent with 'stretch' default in cross-dimension

I mildly prefer C as well.  It's clearly a better variant of A, so we
don't even need to consider A.  I like the benefits of C, that it
makes alignment work by default and makes it easier to handle the
common case of a single item absorbing the leftover space.

~TJ
Received on Monday, 4 June 2012 17:30:15 GMT

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