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

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

From: Daniel Holbert <dholbert@mozilla.com>
Date: Thu, 17 Jul 2014 11:19:09 -0700
Message-ID: <53C8139D.50806@mozilla.com>
To: www-style <www-style@w3.org>
Hi www-style,

Currently, the special min-[width|height] behavior only applies "on a
flex item whose 'overflow' is 'visible'".

I think that needs a tweak, to only be about the *main-axis* "overflow"

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

Can we adjust the spec-text so that it only checks the "overflow"
sub-property in the main axis, to avoid this?

Received on Thursday, 17 July 2014 18:19:37 UTC

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