[Webkit-unassigned] [Bug 136041] Safari (WebKit) doesn't wrap element within flex when width comes below min-width

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 25 14:01:18 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=136041

Philip Walton <philip at philipwalton.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |philip at philipwalton.com

--- Comment #3 from Philip Walton <philip at philipwalton.com> ---
I've added this bug to the Flexbugs list I maintain:
https://github.com/philipwalton/flexbugs#11-min-and-max-size-declarations-are-ignored-when-wrapping-flex-items

I'll copy the bug and description here to make it easier to reference:

## Min and max size declarations are ignored in Safari when wrapping flex items

Bug: http://codepen.io/anon/pen/BNrGwN
Workaround: http://codepen.io/anon/pen/RPMqjz

Safari uses min/max width/height declarations for actually rendering the size of flex items, but it ignores those values when calculating how many items should be on a single line of a multi-line flex container. Instead, it simply uses the item's `flex-basis` value, or its width if the flex basis is set to `auto`.

This is problematic when using the `flex: 1` shorthand because that sets the flex basis to `0%`, and an infinite number of flex items could fit on a single line if the browser thinks their widths are all zero. The bug above (http://codepen.io/philipwalton/pen/BNrGwN) show an example of this happening.

This is also problematic when creating fluid layouts where you want your flex items to be no bigger than X but no smaller than Y. Since Safari ignores those values when determining how many items fit on a line, that strategy won't work.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150725/af0e5621/attachment.html>


More information about the webkit-unassigned mailing list