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

On Mon, Oct 29, 2012 at 2:24 AM, Andrew Fedoniouk
<news@terrainformatica.com> wrote:
> On Sun, Oct 28, 2012 at 2:59 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> On Sun, Oct 28, 2012 at 6:30 PM, Andrew Fedoniouk
>> <news@terrainformatica.com> wrote:
>>> Could you explain first what that "align-self=stretch"
>>> means exactly ?
>>
>> Read the spec.  It's extremely simple.  The definition is at
>> <http://dev.w3.org/csswg/css3-flexbox/#align-stretch>.
>>
>> Nothing in my email needs further definition or explanation if you've
>> read the spec.
>>
>
> Sorry, I thought it was some DOM special attribute, not a style's one.
>
> The problem then lies in the fact that instead of using width/height
> to set dimensions of the element some other attribute is used.
>
> For example if that sample was written as
>
> img {
>    width:*; // flex width
>    max-width:max-content;
>    height:*; // flex-height, spans row height
>    content-sizing: stretch keep-ratio;
> }
> then you will get what you want.
>
> In other words the problem is in the design of flexbox itself -
> in the manner how you assign flexibility.

No it's not. As I explained in the original email, the problem is that
flexbox lets you set strong constraints on width and height that need
to be treated the same as explicit widths and heights for the purpose
of overriding the aspect ratio of images and similar elements.  We're
not currently performing this special treatment.

~TJ

Received on Monday, 29 October 2012 06:24:37 UTC