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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
<!DOCTYPE html>
<meta charset="UTF-8">
<title>height: calc-size() animations</title>
<link rel="help" href="https://drafts.csswg.org/css-values-5/#calc-size">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../../support/interpolation-testcommon.js"></script>
<style>
.target {
display: block;
}
.target::before {
display: block;
content: "";
width: 23px;
height: 100px;
}
</style>
<body>
<script>
test_interpolation({
property: 'height',
from: 'calc-size(auto, size)',
to: 'calc-size(auto, size * 2)',
}, [
{ at: -0.25, expect: '75px' },
{ at: 0, expect: '100px' },
{ at: 0.25, expect: '125px' },
{ at: 0.5, expect: '150px' },
{ at: 0.75, expect: '175px' },
{ at: 1, expect: '200px' },
{ at: 1.25, expect: '225px' },
]);
test_interpolation({
property: 'height',
from: neutralKeyframe,
to: 'calc-size(auto, size * 2)',
}, [
{ at: -0.25, expect: '75px' },
{ at: 0, expect: '100px' },
{ at: 0.25, expect: '125px' },
{ at: 0.5, expect: '150px' },
{ at: 0.75, expect: '175px' },
{ at: 1, expect: '200px' },
{ at: 1.25, expect: '225px' },
]);
test_interpolation({
property: 'height',
from: 'calc-size(min-content, 0 * size)',
to: 'calc-size(min-content, size)',
}, [
{ at: -0.25, expect: '0' },
{ at: 0, expect: '0' },
{ at: 0.25, expect: '25px' },
{ at: 0.5, expect: '50px' },
{ at: 0.75, expect: '75px' },
{ at: 1, expect: '100px' },
{ at: 1.25, expect: '125px' },
]);
test_interpolation({
property: 'height',
from: 'calc-size(min-content, 0px)',
to: 'calc-size(min-content, size)',
}, [
{ at: -0.25, expect: '0' },
{ at: 0, expect: '0' },
{ at: 0.25, expect: '25px' },
{ at: 0.5, expect: '50px' },
{ at: 0.75, expect: '75px' },
{ at: 1, expect: '100px' },
{ at: 1.25, expect: '125px' },
]);
test_interpolation({
property: 'height',
from: '0',
to: 'calc-size(max-content, size)',
}, [
{ at: -0.25, expect: '0' },
{ at: 0, expect: '0' },
{ at: 0.25, expect: '25px' },
{ at: 0.5, expect: '50px' },
{ at: 0.75, expect: '75px' },
{ at: 1, expect: '100px' },
{ at: 1.25, expect: '125px' },
]);
</script>
|