OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <meta charset="UTF-8"> | |
3 <style> | |
4 .parent { | |
5 caret-color: blue; | |
6 } | |
7 .target { | |
8 display: inline-block; | |
9 font-size: 60pt; | |
10 caret-color: yellow; | |
11 } | |
12 .expected { | |
13 margin-right: 15px; | |
14 } | |
15 </style> | |
16 <body alink="red" link="blue" contenteditable> | |
17 <template id="target-template">T</template> | |
18 <script src="resources/interpolation-test.js"></script> | |
19 <script> | |
20 assertNoInterpolation({ | |
alancutter (OOO until 2018)
2016/12/21 00:49:05
The underlying value is yellow so it should be int
| |
21 property: 'caret-color', | |
22 from: neutralKeyframe, | |
23 to: 'green', | |
24 }); | |
25 | |
26 assertNoInterpolation({ | |
27 property: 'caret-color', | |
28 from: 'initial', | |
29 to: 'green', | |
30 }); | |
31 | |
32 assertNoInterpolation({ | |
33 property: 'caret-color', | |
34 from: 'auto', | |
35 to: 'green', | |
36 }); | |
37 | |
38 assertInterpolation({ | |
39 property: 'caret-color', | |
40 from: 'currentColor', | |
41 to: 'green', | |
42 }, [ | |
43 {at: -0.3, is: 'rgb(0, 0, 0)'}, | |
44 {at: 0, is: 'rgb(0, 0, 0)'}, | |
45 {at: 0.3, is: 'rgb(0, 38, 0)'}, | |
46 {at: 0.6, is: 'rgb(0, 77, 0)'}, | |
47 {at: 1, is: 'rgb(0, 128, 0)'}, | |
48 {at: 1.5, is: 'rgb(0, 192, 0)'}, | |
49 ]); | |
50 | |
51 assertInterpolation({ | |
52 property: 'caret-color', | |
53 from: 'inherit', | |
54 to: 'green', | |
55 }, [ | |
56 {at: -0.3, is: 'rgb(0, 0, 255)'}, | |
57 {at: 0, is: 'rgb(0, 0, 255)'}, | |
58 {at: 0.3, is: 'rgb(0, 38, 179)'}, | |
59 {at: 0.6, is: 'rgb(0, 77, 102)'}, | |
60 {at: 1, is: 'rgb(0, 128, 0)'}, | |
61 {at: 1.5, is: 'rgb(0, 192, 0)'}, | |
62 ]); | |
63 | |
64 assertInterpolation({ | |
65 property: 'caret-color', | |
66 from: 'unset', | |
67 to: 'green', | |
68 }, [ | |
69 {at: -0.3, is: 'rgb(0, 0, 255)'}, | |
70 {at: 0, is: 'rgb(0, 0, 255)'}, | |
71 {at: 0.3, is: 'rgb(0, 38, 179)'}, | |
72 {at: 0.6, is: 'rgb(0, 77, 102)'}, | |
73 {at: 1, is: 'rgb(0, 128, 0)'}, | |
74 {at: 1.5, is: 'rgb(0, 192, 0)'}, | |
75 ]); | |
76 | |
77 assertInterpolation({ | |
78 property: 'caret-color', | |
79 from: 'black', | |
80 to: 'orange', | |
81 }, [ | |
82 {at: -0.3, is: 'rgb(0, 0, 0)'}, | |
83 {at: 0, is: 'rgb(0, 0, 0)'}, | |
84 {at: 0.3, is: 'rgb(77, 50, 0)'}, | |
85 {at: 0.6, is: 'rgb(153, 99, 0)'}, | |
86 {at: 1, is: 'rgb(255, 165, 0)'}, | |
87 {at: 1.5, is: 'rgb(255, 248, 0)'}, | |
88 ]); | |
89 | |
90 assertInterpolation({ | |
91 property: 'caret-color', | |
92 from: '-webkit-activelink', | |
93 to: 'green', | |
94 }, [ | |
95 {at: -0.3, is: 'rgb(255, 0, 0)'}, | |
96 {at: 0, is: 'rgb(255, 0, 0)'}, | |
97 {at: 0.3, is: 'rgb(179, 38, 0)'}, | |
98 {at: 0.6, is: 'rgb(102, 77, 0)'}, | |
99 {at: 1, is: 'rgb(0, 128, 0)'}, | |
100 {at: 1.5, is: 'rgb(0, 192, 0)'}, | |
101 ]); | |
102 | |
103 assertInterpolation({ | |
104 property: 'caret-color', | |
105 from: '-webkit-link', | |
106 to: 'green', | |
107 }, [ | |
108 {at: -0.3, is: 'rgb(0, 0, 255)'}, | |
109 {at: 0, is: 'rgb(0, 0, 255)'}, | |
110 {at: 0.3, is: 'rgb(0, 38, 179)'}, | |
111 {at: 0.6, is: 'rgb(0, 77, 102)'}, | |
112 {at: 1, is: 'rgb(0, 128, 0)'}, | |
113 {at: 1.5, is: 'rgb(0, 192, 0)'}, | |
114 ]); | |
115 </script> | |
116 </body> | |
OLD | NEW |