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

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.
>
> DETAILS:
> ========
> 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.

~TJ

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