Bug 113519

Summary: for flex items, percent margins and paddings should resolve against their respective dimension
Product: WebKit Reporter: Tony Chang <tony>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: cbiesinger, claude.pache, dholbert, m.goleb+bugzilla, webkit
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Description Tony Chang 2013-03-28 10:49:19 PDT
Normally, margin top and margin bottom resolve against the width of the containing block, but the working group decided that for flex items, we should resolve against the height of the containing block.
http://lists.w3.org/Archives/Public/www-style/2013Mar/0688.html

This should be an easy change to make. See RenderFlexibleBox::computeChildMarginValue.
Comment 1 Christian Biesinger 2013-08-22 16:03:16 PDT
*** Bug 120003 has been marked as a duplicate of this bug. ***
Comment 2 Daniel Holbert 2014-01-17 15:45:58 PST
*** Bug 126809 has been marked as a duplicate of this bug. ***
Comment 3 Michał Gołębiowski-Owczarek 2018-02-09 14:23:39 PST
Both Edge & Firefox teams have committed to change to align with the Chrome/Safari behavior. The spec also got an update to mandate this behavior: https://drafts.csswg.org/css-grid-1/#item-margins

It sounds that this issue should be closed as "Won't Fix".
Comment 4 Daniel Holbert 2018-02-09 14:51:07 PST
Right -- and the spec changed, too, such that WebKit is now correct according to the spec.

So really this could now be "Resolved|Invalid", in the sense that WebKit is matching what the spec requires, i.e. the reported behavior is actually correct/intentional & not a bug.

(At least, that'd be the correct resolution if this were in the Mozilla/Firefox bug tracker -- I'm not sure if the bug-resolution semantics are the same in WebKit's bug tracker.)