W3C home > Mailing lists > Public > www-style@w3.org > February 2015

Re: [css-flexbox] Is intrinsic aspect ratio considered when the flex-basis is definite?

From: Philip Walton <philip@philipwalton.com>
Date: Wed, 25 Feb 2015 19:15:50 -0800
Message-ID: <CAGRhNhUHianr=0f8zad7xoWw84wh4UrZFnMvPiQ+UNUAQg0qFg@mail.gmail.com>
To: Greg Whitworth <gwhit@microsoft.com>
Cc: www-style list <www-style@w3.org>, Daniel Holbert <dholbert@mozilla.com>
On Mon, Feb 23, 2015 at 2:44 PM, Greg Whitworth <gwhit@microsoft.com> wrote:

> OOOOOH, you better not top post or Tab will give you a nasty-gram!    ;)
> > I was under the impression that the minimum size calculation table you
> linked to only applied if the flex-basis was `auto`. In this case the
> flex-basis is `150px` and the grow and shrink properties are both `0`,
> > so I assume that means this flex item's main size is guaranteed to be
> 150 pixels.
> No because each algo has you clamp to the min and max constraint. You
> start off with the flex basis but in multiple places the spec says to
> double check and clamp it, for example under flex base size determination:
>         # The hypothetical main size is the item’s flex base size clamped
> according to its min and max main size properties.
> The main size properties are width and height respectively, which include
> their min/max counterparts respectively depending on the direction of your
> flex container. The reason for this is because if flex-basis was treated
> the same as width as you state, the flex shortand defaults to 0% = 0px
> which would have results that people would not want (not being able to see
> the content).

I see, I'd remembered reading something Tab wrote on another thread and
incorrectly came to that conclusion. He said: "If they
have a definite flex-basis, their widths are *totally ignored*", but I
guess in that quote he's referring to the main-size properties and not the
min/max-main-size properties.

It still seems counter-intuitive to me that a definite flex-basis paired
with a zero value for the flex-grow/shrink properties would ever be
anything other than that flex-basis value. All of the shorthands either
have a flex-grow/shrink value or a flex-basis of auto, so the result of
"not being able to see the content" is unlikely to happen by accident.
Received on Thursday, 26 February 2015 03:16:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:51 UTC