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 descriptionUserAgent: 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:
,
Sep 27 2017
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.
,
Sep 27 2017
,
Sep 28 2017
,
Sep 28 2017
Ian, you've spent more time thinking about margins lately than anyone really should. What's your take on this?
,
Sep 28 2017
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?
,
Sep 28 2017
(also, thank you peter for the small testcase). :)
,
Sep 30 2017
Option two would be ideal if it's web-compat. Option three if not. Thanks!
,
Aug 1
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by manoranj...@chromium.org
, Sep 26 2017