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

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.

-- 
Andrew Fedoniouk.

http://terrainformatica.com

Received on Monday, 29 October 2012 01:24:32 UTC