RESOLVED FIXED 87546
Implied minimum size of flex items is min-content
https://bugs.webkit.org/show_bug.cgi?id=87546
Summary Implied minimum size of flex items is min-content
Tony Chang
Reported 2012-05-25 16:11:21 PDT
In new flexbox, the min-{width,height} in the flex direction should default to min-content. This avoids overflowing flex items if we can shrink another item. It also means we will overflow the flexbox rather than flex items. http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
Attachments
Patch (21.33 KB, patch)
2012-07-12 13:25 PDT, Ojan Vafai
tony: review+
Ojan Vafai
Comment 1 2012-07-12 13:25:06 PDT
Tony Chang
Comment 2 2012-07-12 13:52:18 PDT
Comment on attachment 152045 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152045&action=review > Source/WebCore/rendering/RenderFlexibleBox.cpp:754 > + Length min = isHorizontalFlow() ? child->style()->minWidth() : child->style()->minHeight(); Nit: childMin or maybe even childMainAxisMin > Source/WebCore/rendering/RenderFlexibleBox.cpp:805 > + if (childSize < minContent) > + return minContent; Nit: You could either return std::max(childSize, minContent) or assign that value to childSize. > LayoutTests/css3/flexbox/flex-item-min-size.html:41 > + <div>Tests that flex items have default min-size to min-content in the main axis direction.</div> It would be nice to test this for other writing modes.
Ojan Vafai
Comment 3 2012-07-12 14:38:40 PDT
Note You need to log in before you can comment on or make changes to this bug.