summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/percentage-heights-011.html
blob: fda9c9b4f306adbfc8cd0eeb06f700ad2a5e60a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<title>CSS Flexbox: percentage height of flex item</title>
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-property">
<link href="support/flexbox.css" rel="stylesheet">
<meta name="assert" content="This test checks that the height of flexitems work properly
with percentage value and 'overflow-y' auto.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<script>
window.onload = function()
{
    var outer = document.getElementById("outer");
    outer.style.height = "300px";
    outer.offsetLeft;
    outer.style.height = "100px";
    checkLayout('#outer');
};
</script>
</head>
<body>
<div id=log></div>
<div id="outer" data-expected-height="100">
  <div class="flexbox" data-expected-height="100" style="height: 100%">
    <div class="flex-one" data-expected-height="100" style="overflow-y: auto; height: 100%">
        <div data-expected-height="100" style="height: 100%">
          <div data-expected-height="100" style="width: 100px; height: 100px; background-color: green"></div>
        </div>
    </div>
  </div>
</div>
</body>
</html>