New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769039 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug


Show other hotlists

Hotlists containing this issue:
layoutng


Sign in to add a comment

Margin of child element push down the next element of parent when parent element use min-height

Reported by pe...@vaszari.com, Sep 26 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. goto: https://codepen.io/anon/pen/vexyoO
2. you see gap between divs

What is the expected behavior?
divs touch each other
same as using height over min-height:
https://codepen.io/anon/pen/WZpRNZ

What went wrong?
They have gaps

Did this work before? No 

Does this work in other browsers? No
 Firefox is good Edge has the same issue.

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 10.0
Flash Version:
 
Labels: Needs-Triage-M61
Cc: ranjitkan@chromium.org
Labels: M-63 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Windows 10, Mac 10.12.6, Ubuntu 14.04 on stable 61.0.3163.100. Issue is a non regression as observed from M50 builds 50.0.2624.0. Issue is not observed on FF browser.

Untriaged it so that issue gets addressed.
Components: Blink>HTML

Comment 4 by tkent@chromium.org, Sep 28 2017

Components: -Blink>HTML Blink>Layout

Comment 5 by e...@chromium.org, Sep 28 2017

Owner: ikilpatrick@chromium.org
Ian, you've spent more time thinking about margins lately than anyone really should. What's your take on this?
FF is correct here.

We actually have a TODO[1] in LayoutNG to fix this (it will be a trivial change), but we haven't done this yet as we noticed that Edge didn't support it, and didn't know how web compatible this would be.

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc?q=ng_block_layout_al&sq=package:chromium&l=394 

A few different options:
 - Try a fix in existing layout margin collapsing code. See if we can land it without web compat issues. I had a quick look (~15mins), and its not immediately obvious how to fix this in the existing layout code).
 - Fix in LayoutNG now, and see if we can do this in LayoutNG phase 1 landing. 
 - Try to fix this after landing LayoutNG phase 1. 

Thoughts?
(also, thank you peter for the small testcase). :)

Comment 8 by e...@chromium.org, Sep 30 2017

Status: Available (was: Untriaged)
Option two would be ideal if it's web-compat. Option three if not.
Thanks!
Status: Assigned (was: Available)

Sign in to add a comment