- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 21 May 2012 18:29:28 -0700
- To: www-style list <www-style@w3.org>
(I'm hoping that this doesn't start a new thread. For some reason Ojan's message hasn't my inbox yet, an hour after it showed up in the list archives.) On May 21 2012, Ojan said: > I think this was probably an oversight in the recent changes to the spec, > but at some point, the default value of flex-basis changed from 0px to auto. > > "‘flex: <positive-number>’ > Equivalent to ‘flex: <positive-number> 1 0px’. This value makes the flex > item flexible, and sets the flex basisto zero, resulting in an item that > receives the specified proportion of the free space in the flex container. > If all items in the flex container use this pattern, their sizes will be > proportional to the specified flex ratio." > > That seems like the correct default behavior. Having auto as the preferred > size is considerably slower and often not what the developer wants. It > should not be the default value. > > "flex:auto == flex:1 1 auto" and "flex:none == flex: 0 0 auto" both seem > fine to me as is, but the default value for flex should be "1 1 0px". Before we added flex-grow/shrink/basis, the initial value for 'flex' was "none", or "0 0 auto". I suspect that's why gave flex-basis 'auto' as its initial value. Now, though, everything flexes by default. I have no real opinion on whether "absolute" or "relative" flex is the better default behavior. Anyone else have strong opinions either way? ~TJ
Received on Tuesday, 22 May 2012 01:30:38 UTC