Bug 113519 - for flex items, percent margins and paddings should resolve against their respective dimension
Summary: for flex items, percent margins and paddings should resolve against their res...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 120003 126809 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-28 10:49 PDT by Tony Chang
Modified: 2018-02-09 14:51 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.)