-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Expand file tree
/
Copy pathintrinsic-percent-replaced-028.html
More file actions
50 lines (46 loc) · 1.72 KB
/
intrinsic-percent-replaced-028.html
File metadata and controls
50 lines (46 loc) · 1.72 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
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" title="Oriol Brufau" href="obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-sizing-3/#replaced-percentage-min-contribution">
<meta name="assert" content="A preferred or max inline size property set to a percentage is treated as zero when computing the min-content contribution.">
<style>
.wrapper {
display: inline-block;
border: solid;
margin: 5px;
}
</style>
<div style="width: 0px">
<!-- Set 'width' to a percentage -->
<div class="wrapper" data-expected-client-width="0">
<canvas style="width: 0%; max-width: 100px"></canvas>
</div>
<div class="wrapper" data-expected-client-width="0">
<canvas style="width: 50%; max-width: 100px"></canvas>
</div>
<div class="wrapper" data-expected-client-width="0">
<canvas style="width: 100%; max-width: 100px"></canvas>
</div>
<div class="wrapper" data-expected-client-width="0">
<canvas style="width: 200%; max-width: 100px"></canvas>
</div>
<!-- Set 'max-width' to a percentage -->
<div class="wrapper" data-expected-client-width="0">
<canvas style="width: 100px; max-width: 0%"></canvas>
</div>
<div class="wrapper" data-expected-client-width="0">
<canvas style="width: 100px; max-width: 50%"></canvas>
</div>
<div class="wrapper" data-expected-client-width="0">
<canvas style="width: 100px; max-width: 100%"></canvas>
</div>
<div class="wrapper" data-expected-client-width="0">
<canvas style="width: 100px; max-width: 200%"></canvas>
</div>
</div>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<script>
checkLayout(".wrapper");
</script>