blob: 592b5212ea6e5bd787aa9aab0d7f1c16c78bc134 (
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
|
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Flexbox Test: percentage heights in descendants of anonymous flex items</title>
<link href="resources/flexbox.css" rel="stylesheet">
<link rel="author" title="Sergio Villar Senin" href="mailto:svillar@igalia.com">
<link rel="match" href="reference/percentage-descendant-of-anonymous-flex-item-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-items">
<style>
.flexbox {
width: 200px;
height: 200px;
}
</style>
<!--
Both Blink and WebKit implement buttons as flexboxes, which in this case, wrap the child in an anonymous box.
Anonymous boxes are skipped when computing percentage heights but we need to ensure that their children with
percentage heights are properly sized.
-->
<p>The test PASS if you see a 200x100 green rectangle inside a button.</p>
<div class="flexbox column">
<div style="height: 50%;">
<button style="width: 200px; height: 100%;">
<div style="width: 200px; height: 100%; background-color: green;"></div>
</button>
</div>
</div>
|