OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
3 <style> | 3 <style> |
4 .target { | 4 .target { |
5 width: 100px; | 5 width: 100px; |
6 height: 100px; | 6 height: 100px; |
7 stroke: black; | 7 stroke: black; |
8 stroke-width: 20px; | 8 stroke-width: 20px; |
| 9 color: blue; |
9 } | 10 } |
10 .replica { | 11 .replica { |
11 stroke: green; | 12 stroke: green; |
12 } | 13 } |
13 </style> | 14 </style> |
14 <body> | 15 <body> |
15 <template id="target-template"> | 16 <template id="target-template"> |
16 <svg> | 17 <svg> |
17 <defs> | 18 <defs> |
18 <linearGradient id="gradient"> | 19 <linearGradient id="gradient"> |
(...skipping 14 matching lines...) Expand all Loading... |
33 {at: -0.4, is: '#ffe700'}, | 34 {at: -0.4, is: '#ffe700'}, |
34 {at: 0, is: 'orange'}, | 35 {at: 0, is: 'orange'}, |
35 {at: 0.2, is: '#cc8433'}, | 36 {at: 0.2, is: '#cc8433'}, |
36 {at: 0.6, is: '#664299'}, | 37 {at: 0.6, is: '#664299'}, |
37 {at: 1, is: 'blue'}, | 38 {at: 1, is: 'blue'}, |
38 {at: 1.5, is: 'blue'} | 39 {at: 1.5, is: 'blue'} |
39 ]); | 40 ]); |
40 assertInterpolation({ | 41 assertInterpolation({ |
41 property: 'fill', | 42 property: 'fill', |
42 from: 'orange', | 43 from: 'orange', |
| 44 to: 'currentColor' |
| 45 }, [ |
| 46 {at: 0, is: 'orange'}, |
| 47 {at: 0.2, is: '#cc8433'}, |
| 48 {at: 0.6, is: '#664299'}, |
| 49 {at: 1, is: 'blue'}, |
| 50 ]); |
| 51 assertInterpolation({ |
| 52 property: 'fill', |
| 53 from: 'currentColor', |
| 54 to: 'orange' |
| 55 }, [ |
| 56 {at: 0, is: 'blue'}, |
| 57 {at: 0.2, is: '#3321cc'}, |
| 58 {at: 0.6, is: '#996366'}, |
| 59 {at: 1, is: 'orange'}, |
| 60 ]); |
| 61 assertInterpolation({ |
| 62 property: 'fill', |
| 63 from: 'orange', |
43 to: 'url(#gradient)' | 64 to: 'url(#gradient)' |
44 }, [ | 65 }, [ |
45 {at: 0, is: 'orange'}, | 66 {at: 0, is: 'orange'}, |
46 {at: 0.2, is: 'orange'}, | 67 {at: 0.2, is: 'orange'}, |
47 {at: 0.6, is: 'url(#gradient)'}, | 68 {at: 0.6, is: 'url(#gradient)'}, |
48 {at: 1, is: 'url(#gradient)'} | 69 {at: 1, is: 'url(#gradient)'} |
49 ]); | 70 ]); |
50 </script> | 71 </script> |
51 </body> | 72 </body> |
OLD | NEW |