W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [css-flexbox] min-[width|height]:auto, and the meaning of "flex item whose 'overflow' is 'visible'"

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 17 Jul 2014 15:16:11 -0700
Message-ID: <CAAWBYDDemU_f_J7C84L7aDc5=bnhJ5Ht=7iJvk3ksLa6k+YQ3A@mail.gmail.com>
To: Daniel Holbert <dholbert@mozilla.com>
Cc: www-style <www-style@w3.org>
On Thu, Jul 17, 2014 at 11:19 AM, Daniel Holbert <dholbert@mozilla.com> wrote:
> Hi www-style,
> Currently, the special min-[width|height] behavior only applies "on a
> flex item whose 'overflow' is 'visible'".
> http://dev.w3.org/csswg/css-flexbox/#min-size-auto
> tl;dr:
> ======
> I think that needs a tweak, to only be about the *main-axis* "overflow"
> sub-property.
> ========
> So, I'm taking the clarifier "'overflow' is 'visible'" to mean "both
> sub-properties of 'overflow' are 'visible'".  (Since that's what
> "overflow:visible" corresponds to.)
> So that means if we set 'overflow-y' on a flex item in a horizontal
> flexbox, then per the current spec text, that would disable the
> min-width:auto behavior.  I think that is bad.
> To see why, consider this flex item (in a horizontal flex container with
> unconstrained height):
>   <div>wiiiiiiiiiiiiiiiiiiiiiiiide text text text</div>
> Its "min-width:auto" will resolve to the width of "wii...ide".  We'll
> prevent it from shrinking below that width.
> Now, let's say we add "overflow-y:auto" to it.  Since we have
> unconstrained height, there isn't any vertical overflow, and you
> wouldn't expect this styling to affect the layout. However, per the
> letter of the current spec text, it does -- it means we no longer have
> "overflow:visible", which means the flex item now gets a min-width of 0,
> and is allowed to shrink to 0 width (making "wiii...ide" overflow
> horizontally).
> Can we adjust the spec-text so that it only checks the "overflow"
> sub-property in the main axis, to avoid this?

Yup, you're right.  I'll fix.

Received on Thursday, 17 July 2014 22:16:58 UTC

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