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: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 28 Oct 2012 18:24:05 -0700
Message-ID: <CALRQH7_hDZMNfgR5RNk8pO6TVW27cgd3KNz8RSbALc=ts3RQ1Q@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
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 GMT

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