blob: b9c418fdd8cc21ee548f77f60749a0d95f87c91f [file] [log] [blame]
tony@chromium.org21f8ce82012-05-03 23:21:44 +00001<!DOCTYPE html>
2<html>
3<head>
4<style>
5div {
6 outline: 1px solid black;
7 background: hsla(210,100%,90%, .8);
8 padding: 5px;
9 margin: 5px;
10}
11
12.flexbox {
hyatt@apple.com247170f2017-02-28 16:23:15 +000013 display: flex;
tony@chromium.org21f8ce82012-05-03 23:21:44 +000014}
15
16.row {
hyatt@apple.com247170f2017-02-28 16:23:15 +000017 flex-direction: row;
tony@chromium.org21f8ce82012-05-03 23:21:44 +000018}
19
20.column {
hyatt@apple.com247170f2017-02-28 16:23:15 +000021 display: flex;
22 flex-direction: column;
tony@chromium.org21f8ce82012-05-03 23:21:44 +000023}
24
25.flex {
hyatt@apple.com247170f2017-02-28 16:23:15 +000026 flex: 1 0 auto;
tony@chromium.org21f8ce82012-05-03 23:21:44 +000027}
28</style>
hyatt@apple.com247170f2017-02-28 16:23:15 +000029<script src="../../resources/testharness.js"></script>
30<script src="../../resources/testharnessreport.js"></script>
31<script src="../../resources/check-layout-th.js"></script>
tony@chromium.org21f8ce82012-05-03 23:21:44 +000032</head>
tony@chromium.orgb1541ca2012-07-13 19:58:47 +000033<body onload="checkLayout('.flexbox')">
hyatt@apple.com247170f2017-02-28 16:23:15 +000034<div id=log></div>
tony@chromium.org21f8ce82012-05-03 23:21:44 +000035There should be two boxes of equal height on the left and 3 boxes of equal
36height on the right.
37<div class="flexbox row" style="width: 600px">
38 <div data-expected-width=290 data-expected-height=220 class="column flex">
39 <div data-expected-width=270 data-expected-height=95 class="flex"></div>
40 <div data-expected-width=270 data-expected-height=95 class="flex"></div>
41 </div>
42 <div data-expected-width=290 data-expected-height=220 class="column flex">
43 <div data-expected-width=270 data-expected-height=60 class="flex" style="height: 50px;"></div>
44 <div data-expected-width=270 data-expected-height=60 class="flex" style="height: 50px;"></div>
45 <div data-expected-width=270 data-expected-height=60 class="flex" style="height: 50px;"></div>
46 </div>
47</div>
48
49None of the boxes should overflow and the inner most boxes should be end aligned.
50<div class="flexbox column" style="width: 600px; height: 300px; position: relative;">
hyatt@apple.com247170f2017-02-28 16:23:15 +000051 <div data-expected-width=590 data-expected-height=250 class="column flex" style="justify-content: flex-end">
52 <div data-offset-y="180" data-expected-width=570 data-expected-height=30 style="height: 20px; flex: none;"></div>
53 <div data-offset-y="220" data-expected-width=570 data-expected-height=30 style="height: 20px; flex: none;"></div>
tony@chromium.org21f8ce82012-05-03 23:21:44 +000054 </div>
hyatt@apple.com247170f2017-02-28 16:23:15 +000055 <div data-expected-width=590 data-expected-height=30 style="height: 20px; flex: none;"></div>
tony@chromium.org21f8ce82012-05-03 23:21:44 +000056</div>
57
58
59</body>
60</html>