RE: [css3-flexbox] chunk on line formation doesn't handle flexbox items that are wider than flexbox

> From: Daniel Holbert [mailto:dholbert@mozilla.com]
> Sent: Tuesday, April 17, 2012 3:02 PM
> 
> Right now, the Flexbox Layout Algorithm chunk on line-breaking doesn't
> seem to account for cases where a single flexbox item is larger than the
> flexbox's main-size.
> 
> The relevant spec text (from the current ED) is:
> {{
> 2. Collect as many consecutive flexbox items as possible, starting from the
> first item, while keeping the sum of their margin-box main size smaller than
> the flexbox's available space... The items so collected form a single flexbox
> line.
> 3. Repeat the previous step, starting each time from the first flexbox item
> not yet collected into a flexbox line, until all flexbox items have been
> collected into flexbox lines.
> }}
> 
> If an individual flexbox item is too large, then it's impossible to satisfy the
> condition in step 2 ("keeping the sum of their margin-box main size smaller
> than the flexbox's available space")
> 
> Presumably we want to handle such cases by giving these items their own
> line (which they'll overflow in the main axis, but there's nothing we can do
> about that).  Can we add that to the spec?

sure, there must be at least one item in each line.

How does this sound?

	2.Collect as many consecutive flexbox items as possible, starting from 
	the first item, <INS> then add items </INS> while keeping the sum of 
	their margin-box main size smaller than the flexbox's available space. 
	If a flexbox item is sized with a flexible length, then for the purpose 
	of this step, clamp its size between its minimum and maximum main 
	sizes. The items so collected form a single flexbox line.

Alex

Received on Wednesday, 18 April 2012 06:48:19 UTC