Bug 87546

Summary: Implied minimum size of flex items is min-content
Product: WebKit Reporter: Tony Chang <tony>
Component: Layout and RenderingAssignee: Ojan Vafai <ojan>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, ojan, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 88437    
Bug Blocks: 62048    
Attachments:
Description Flags
Patch tony: review+

Tony Chang
Reported Saturday, May 26, 2012 12:11:21 AM UTC
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 Thursday, July 12, 2012 9:25:06 PM UTC
Tony Chang
Comment 2 Thursday, July 12, 2012 9:52:18 PM UTC
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 Thursday, July 12, 2012 10:38:40 PM UTC
Note You need to log in before you can comment on or make changes to this bug.