- From: Lev Solntsev <greli@mail.ru>
- Date: Tue, 13 Jan 2015 12:21:26 +0300
- To: "Tab Atkins Jr." <jackalmage@gmail.com>, fantasai <fantasai.lists@inkedblade.net>
- Cc: www-style <www-style@w3.org>, "Daniel Holbert" <dholbert@mozilla.com>
Thanks for the reply, that's interesting. See comments below fantasai <fantasai.lists@inkedblade.net> wrote Tue, 13 Jan 2015 11:37:03 +0300: > [snip] > Then the caption's hypothetical main size is also calculated. > It fills the flex container widthwise, and is assigned a height > based on the amount of content. This is its min-content height. > > The flex container's height is now calculated. Since it is specified > to max out at 100vh (or 100%, whichever is specified), it will be > at minimum the content height and at most that amount. > http://dev.w3.org/csswg/css-flexbox/#algo-main-container > > Next, we flex. Since the initial value of 'flex' is '0 1 auto', > the image's main size is, if necessary to satisfy the flex > container's max-height, shrunk. The caption doesn't shrink > because of the automatic min-content minimum. (!) > http://dev.w3.org/csswg/css-flexbox/#algo-flex > > Then we compute the cross size based on the main size. If the > image has shrunk height-wise, this will cause the width to > shrink accordingly, since that is the usual rules for layout. > http://dev.w3.org/csswg/css-flexbox/#algo-cross-item Indeed, in the Editor's draft version it should be so. I was referring to the Working draft. > Since we are centering instead of stretching, the image is not > widened again. It therefore remains at its aspect ratio. > > Did I miss something? > > Note: Firefox currently forgets to handle the aspect ratio in the > final cross size determination step. Other browsers too, probably because the current Working draft doesn't say so.
Received on Tuesday, 13 January 2015 09:21:59 UTC