File: columns-interpolation.html

package info (click to toggle)
thunderbird 1%3A144.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 4,725,312 kB
  • sloc: cpp: 7,869,225; javascript: 5,974,276; ansic: 3,946,747; python: 1,421,062; xml: 654,642; asm: 474,045; java: 183,117; sh: 110,973; makefile: 20,398; perl: 14,362; objc: 13,086; yacc: 4,583; pascal: 3,448; lex: 1,720; ruby: 999; exp: 762; sql: 731; awk: 580; php: 436; lisp: 430; sed: 69; csh: 10
file content (136 lines) | stat: -rw-r--r-- 2,887 bytes parent folder | download | duplicates (4)
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<title>columns shorthand interpolation</title>
<link rel="help" href="https://drafts.csswg.org/css-multicol/#propdef-columns">
<link rel="help" href="https://drafts.csswg.org/css-multicol-2/#propdef-columns">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
  .parent {
    columns: 50px / 100px;
  }
  .target {
    columns: 200px / 100px;
  }
</style>
<body>
</body>
<script>
test_interpolation({
  property: 'columns',
  from: '200px 10',
  to: '100px 20',
}, [
  {at: -1, expect: '300px 1'},
  {at: -0.5, expect: '250px 5'},
  {at: 0, expect: '200px 10'},
  {at: 0.5, expect: '150px 15'},
  {at: 1, expect: '100px 20'},
]);

test_interpolation({
  property: 'columns',
  from: neutralKeyframe,
  to: '100px / 200px',
}, [
  {at: -1, expect: '300px / 0px'},
  {at: -0.5, expect: '250px / 50px'},
  {at: 0, expect: '200px / 100px'},
  {at: 0.5, expect: '150px / 150px'},
  {at: 1, expect: '100px / 200px'},
]);

test_interpolation({
  property: 'columns',
  from: '1000px / 500px',
  to: '100px / 200px',
}, [
  {at: -1, expect: '1900px / 800px'},
  {at: -0.5, expect: '1450px / 650px'},
  {at: 0, expect: '1000px / 500px'},
  {at: 0.5, expect: '550px / 350px'},
  {at: 1, expect: '100px / 200px'},
]);

test_interpolation({
  property: 'columns',
  from: '10 / 100px',
  to: '20 / 200px',
}, [
  {at: -0.5, expect: '5 / 50px'},
  {at: 0, expect: '10 / 100px'},
  {at: 0.5, expect: '15 / 150px'},
  {at: 1, expect: '20 / 200px'},
]);

test_interpolation({
  property: 'columns',
  from: '10 100px',
  to: '20 200px',
}, [
  {at: -0.5, expect: '5 50px'},
  {at: 0, expect: '10 100px'},
  {at: 0.5, expect: '15 150px'},
  {at: 1, expect: '20 200px'},
]);

test_interpolation({
  property: 'columns',
  from: '10 100px / auto',
  to: '20 200px / auto',
}, [
  {at: -0.5, expect: '5 50px'},
  {at: 0, expect: '10 100px'},
  {at: 0.5, expect: '15 150px'},
  {at: 1, expect: '20 200px'},
]);

test_interpolation({
  property: 'columns',
  from: 'inherit',
  to: '200px / 900px',
}, [
  {at: -0.5, expect: '0px / 0px'},
  {at: -0.2, expect: '20px / 0px'},
  {at: -0.1, expect: '35px / 20px'},
  {at: 0, expect: '50px / 100px'},
  {at: 0.5, expect: '125px / 500px'},
  {at: 1, expect: '200px / 900px'},
]);

test_no_interpolation({
  property: 'columns',
  from: 'initial',
  to: '100px / 200px',
});

test_no_interpolation({
  property: 'columns',
  from: 'initial',
  to: '100px',
});

test_no_interpolation({
  property: 'columns',
  from: 'initial',
  to: '10',
});

test_no_interpolation({
  property: 'columns',
  from: 'auto',
  to: '100px / 200px',
});

test_no_interpolation({
  property: 'columns',
  from: '100px / 200px',
  to: 'auto',
});

test_no_interpolation({
  property: 'columns',
  from: 'inherit',
  to: 'auto',
});
</script>