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

Re: [css3-flexbox] Bad result in flex algorithm when combining stretch, and elements with an aspect ratio

From: Kang-Hao (Kenny) Lu <kanghaol@oupeng.com>
Date: Mon, 29 Oct 2012 14:53:10 +0800
Message-ID: <508E27D6.8010108@oupeng.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
CC: www-style list <www-style@w3.org>
(12/10/28 23:51), Tab Atkins Jr. wrote:
> Any objections?  Otherwise, I'll edit the flexbox layout algorithm
> with the following two changes:
> 
> 1. Add a bullet point to step 3 (hypothetical main size determination)
> to handle aspect-ratio items with "stretch" alignment (so they get the
> correct hypothetical main size).

I am not getting this part. Are you saying that the *correct*
hypothetical main size of <image> in the above example is 50px? Why?
That doesn't feel right to me....

> 2. Modify step 9 (handling "stretch" alignment) to have an explicit
> statement about handling aspect-ratio items, to clarify that it
> changes the cross-size *while ignoring the aspect ratio*, so the main
> size doesn't change.

This is easier to understand. 'align-self: stretch' has contradicted CSS
2.1 already. For example, a 'height: auto; align-self: stretch;' flex
item would already fail the CSS 2.1 requirement for a non-replaced
element with 'height: auto' saying that the height is the sum of heights
of blocks or lineboxes inside. Therefore, "honoring aspect ratio", being
a requirement for a replaced element with 'height: auto;' , would
similarly fail to be be satisfied.



Cheers,
Kenny
-- 
Web Specialist, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Monday, 29 October 2012 06:53:48 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT