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

RE: [css3-flexbox] better algorithm for hypothetical main size

From: Alex Mogilevsky <alexmog@microsoft.com>
Date: Tue, 12 Jun 2012 23:41:17 +0000
To: www-style list <www-style@w3.org>
Message-ID: <2C86A15F63CD734EB1D846A0BA4E0FC823CC0A69@CH1PRD0310MB381.namprd03.prod.outlook.com>
 From: Alex Mogilevsky [mailto:alexmog@microsoft.com] 
 Sent: Tuesday, June 12, 2012 3:11 PM
 
 <algorithm>
 Otherwise, lay out the item using available space with following dimensions: 
 
 * On main axis: 
     - if flex-basis is auto: infinite
     - if flex-basis 'fit-available' or 'fit-content':  
       flex-container's main size, constrained by its 
       min and max size.
 
 * On cross axis:  flex container's cross size, constrained
   by its min and max size.
 
 The flex base size is the item's resulting measure.
 </algorithm>
 
 In Bugzilla: https://www.w3.org/Bugs/Public/show_bug.cgi?id=17475

Note that this approach assumes that when hypothetical cross size is determined later, it is also done within available space of flex container's cross size, *regardless of alignment*. The spec currently doesn't say so and I am not sure what the preferred behavior is.

What behavior do we prefer for non-stretch alignment now?

A: fit-content in flex container cross-size:

	+++++++++++++++
	|-------------|	
	|my alignment |
	|is stretch   |
	|-------------|
	|-------------|	
	|my alignment |
	|is start     |
	|-------------|
	|             |	
	+++++++++++++++

B: max-content

	+++++++++++++++
	|-------------|	
	|my alignment |
	|is stretch   |
	|-------------|
	|-------------------------
	|my alignment is start   |
	|-------------------------		
	|             |	
	+++++++++++++++


I prefer A, I think it is more consistent with block layout, and it is more useful. But after all the changes I am not sure what the spec expects here.

Alex
Received on Tuesday, 12 June 2012 23:42:38 GMT

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