fune/testing/web-platform/tests/css/css-flexbox/flex-direction-column-overlap-001.html
Mario Sanchez Prada f1ab86de84 Bug 1625992 [wpt PR 22537] - [css-flexbox] Migrate bug669714.html test from css3/flexbox to WPT, a=testonly
Automatic update from web-platform-tests
[css-flexbox] Migrate bug669714.html test from css3/flexbox to WPT

Migrate this test out of third_party/blink/web_tests/css3/flexbox
and into the WPT-specific directory, adding links to the relevant
specs and a test assertion describing its purpose.

Also, rename its filename to something more descriptive and less
Chromium-specific (it currently references crbug.com/669714).

Bug: 1063749
Change-Id: I1bed056c043df7322f1c9b2655b616d7217fb798

--

wpt-commits: 3e8378fc8d6e3892c62d26b8187f8b9c582434f0
wpt-pr: 22537
2020-04-06 12:43:35 +00:00

56 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<title>CSS Flexbox: vertical overlap with flex-direction: column.</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-direction-property">
<link rel="help" href="https://crbug.com/669714"/>
<meta name="assert" content="This test ensures that no unnecessary vertical overlap happens between an inline flex item and a block element inside a nested flexbox with 'flex-direction: column'."/>
<style>
html {
line-height: 1;
font-size: 18px;
}
.flex {
flex: 1;
min-height: 0;
}
.layout-column, .layout-row {
display: flex;
}
.layout-column {
flex-direction: column;
}
#relpos {
position: relative;
top: 1px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body>
<p>XXX and YYY should be on separate lines and not overlap, i.e. the height of .flex should not be 0.</p>
<div class="layout-column" id="container">
<div class="layout-row">
<div class="layout-column">
<div class="flex" data-expected-height="18">XXX<span id="relpos"></span></div>
<div>YYY</div>
</div>
</div>
</div>
<script>
document.body.offsetHeight;
document.getElementById("relpos").innerText = " ";
checkLayout("#container");
</script>
</body>
</html>