-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathaspect-ratio-1.html
More file actions
53 lines (46 loc) · 1.44 KB
/
aspect-ratio-1.html
File metadata and controls
53 lines (46 loc) · 1.44 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<link rel="help"
href="https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<script src="/resources/check-layout-th.js"></script>
<meta name="assert"
content="stretch keyword works in the presence of aspect-ratio">
<style>
p {
margin-bottom: 4px;
}
.grandchild {
width: 30px;
height: 40px;
}
</style>
<body onload="checkLayout('p + div > div')">
<p>basic stretch into definite width</p>
<div style="width: 100px;">
<div style="outline: 5px solid; aspect-ratio: 2 / 1; width: stretch;"
data-expected-height="50">
<div class="grandchild"></div>
</div>
</div>
<p>basic stretch into definite height</p>
<div style="height: 100px;">
<div style="outline: 5px solid; aspect-ratio: 2 / 1; height: stretch;"
data-expected-width="200">
<div class="grandchild"></div>
</div>
</div>
<p>indefinite height stretch is ignored</p>
<div style="width: 100px;">
<div style="outline: 5px solid; aspect-ratio: 2 / 1; height: stretch;"
data-expected-height="50">
<div class="grandchild"></div>
</div>
</div>
<p>indefinite min-height stretch is ignored</p>
<div style="width: 100px;">
<div style="outline: 5px solid; aspect-ratio: 2 / 1; min-height: stretch;"
data-expected-height="50">
<div class="grandchild"></div>
</div>
</div>