- From: Alex Mogilevsky <alexmog@microsoft.com>
- Date: Tue, 5 Jun 2012 22:04:10 +0000
- To: Daniel Holbert <dholbert@mozilla.com>, fantasai <fantasai.lists@inkedblade.net>
- CC: "www-style@w3.org" <www-style@w3.org>
± From: Daniel Holbert [mailto:dholbert@mozilla.com] ± Sent: Tuesday, June 05, 2012 11:45 AM ± ± On 05/30/2012 10:57 PM, fantasai wrote: ± > 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 ± ± Here's one other downside of B (the currently specced behavior): ± - Anonymous flex items & placeholder flex items would have to *always* be ± flexible. (Authors can't style these items, so they must accept the default ± values.) I don't think it matters how awesome anonymous items are, or not. It is very easy to style anonymous items, only takes 11 character... like this: "<div></div>". Just as well, behavior of absolute position placeholder shouldn't affect the choice for initial value. If one of the choices is a little better for normal case but horrible for placeholders, we should chose the one that is better for normal case. That said, I think all choices are OK. Lack of negative flexibility in "A" is a major hassle, so it should be between "B" and "C". We should make this decision together with the choice of what "flex:<number>" does, and it seems the choice her is between "clear" and "clever". CLEAR: * initial: "flex:auto" == "flex:1 1 auto" * "flex:X" == "flex:X X" + Initial has consistent behavior on both axes + Initial is easy to remember - it is flexible, no small print. + Initial is a keyword + No issue of what "flex:0" does - If for particular use most items don't need to flex, you have to specify flexibility CLEVER: * initial: "flex:0 1 auto" * "flex:X" == "flex:X 1" + Smart default behavior: sizing starts from "preferred size", then allows to shrink (kinda like floats) + flex-shrink is almost always non-zero - "flex:0" is still a problem. ... if it is "flex:0 0", it is yet another special case ... if it is "flex:0 1", it looks like we really don't want to make it easy to turn off flex-shrink "B" is "clear", "C" is "clever". I think I can still live with either, initial behavior is not that different, and overwhelming majority of flex items have "flex" explicitly specified anyway. As a developer I prefer "clear". I don't care if that's what I need more or less often, but that's something I can easily understand and remember. Alex
Received on Tuesday, 5 June 2012 22:05:17 UTC