[css3-flexbox] Flexing algorithm and replaced elements (was: [css3-flexbox] Bad result in flex algorithm when combining stretch, and elements with an aspect ratio)

(12/10/28 23:51), Tab Atkins Jr. wrote:
> However, that brings up a further problem.  If you *first* stretch,
> but the item is also flexible, the flexing can cause it to no longer
> fill the flex line.  In other words, it might simply be impossible to
> simultaneously honor the aspect ratio, the 'stretch' keyword, and a
> non-zero "flex" value.  This is similar to how you can't always
> simultaneously honor width, height, and the aspect ratio.  We satisfy
> the latter by breaking the ratio; we consider an explicit width and
> height to be stronger than the implicit aspect ratio.

I think there is a relevant question here:

  Should a replaced item's, say, min cross size property induce a min
  main size when an item flexes?

The current spec

  # Fix min/max violations. Clamp each item's main size by its min and
  # max main size properties....

seems to say it doesn't, but this might produce stretched images when
the item is laid out after flexing, no matter what 'align-self' it has,
since min/max properties are strong.

I think the spec could consider saying that for an replaced element,
it's the *effective min main size* that's used in this step. The
*effective min main size* is defined by this formula:

  max( min main size, min ( min cross size * w/h , max main size ) )

where

  w is the intrinsic width, h is the intrinsic height
  max main size is the maximal of the max main size and the min main
  size properties

. And effective max main size would be defined similarly.

Or was it resolved that the min cross size property should be ignored in
this case?
-- 
Web Specialist, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/

Received on Friday, 2 November 2012 06:23:29 UTC