OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <meta charset="UTF-8"> | 2 <meta charset="UTF-8"> |
3 <style> | 3 <style> |
| 4 .parent { |
| 5 -webkit-column-gap: 90px; |
| 6 } |
4 .target { | 7 .target { |
5 -webkit-column-count: 2; | 8 -webkit-column-count: 2; |
6 -webkit-column-gap: 20px; | 9 -webkit-column-gap: 10px; |
7 column-count: 2; | |
8 column-gap: 20px; | |
9 } | 10 } |
10 .expected div { | 11 .expected div { |
11 opacity: 0.7; | 12 opacity: 0.7; |
12 } | 13 } |
13 .target div { | 14 .target > div { |
14 height: 20px; | 15 height: 20px; |
| 16 background-color: black; |
| 17 } |
| 18 .target.expected > div { |
15 background-color: green; | 19 background-color: green; |
16 } | 20 } |
17 | |
18 .target div ~ div { | |
19 background-color: black; | |
20 } | |
21 </style> | 21 </style> |
22 <body> | 22 <body> |
23 <template id='target-template'> | 23 <template id='target-template'> |
24 <div></div><div></div> | 24 <div></div><div></div> |
25 </template> | 25 </template> |
26 <script src='resources/interpolation-test.js'></script> | 26 <script src='resources/interpolation-test.js'></script> |
27 <script> | 27 <script> |
28 assertInterpolation({ | 28 assertInterpolation({ |
29 property: '-webkit-column-gap', | 29 property: '-webkit-column-gap', |
| 30 from: '', |
| 31 to: '40px', |
| 32 }, [ |
| 33 {at: -0.3, is: '1px'}, |
| 34 {at: 0, is: '10px'}, |
| 35 {at: 0.3, is: '19px'}, |
| 36 {at: 0.6, is: '28px'}, |
| 37 {at: 1, is: '40px'}, |
| 38 {at: 1.5, is: '55px'}, |
| 39 ]); |
| 40 |
| 41 assertInterpolation({ |
| 42 property: '-webkit-column-gap', |
| 43 from: 'initial', |
| 44 to: '20px', |
| 45 }, [ |
| 46 {at: -0.3, is: '0px'}, |
| 47 {at: 0, is: '0px'}, |
| 48 {at: 0.3, is: '6px'}, |
| 49 {at: 0.6, is: '12px'}, |
| 50 {at: 1, is: '20px'}, |
| 51 {at: 1.5, is: '30px'}, |
| 52 ]); |
| 53 |
| 54 assertInterpolation({ |
| 55 property: '-webkit-column-gap', |
| 56 from: 'inherit', |
| 57 to: '20px', |
| 58 }, [ |
| 59 {at: -0.3, is: '111px'}, |
| 60 {at: 0, is: '90px'}, |
| 61 {at: 0.3, is: '69px'}, |
| 62 {at: 0.6, is: '48px'}, |
| 63 {at: 1, is: '20px'}, |
| 64 {at: 1.5, is: '0px'}, |
| 65 ]); |
| 66 |
| 67 assertInterpolation({ |
| 68 property: '-webkit-column-gap', |
| 69 from: 'unset', |
| 70 to: '20px', |
| 71 }, [ |
| 72 {at: -0.3, is: '0px'}, |
| 73 {at: 0, is: '0px'}, |
| 74 {at: 0.3, is: '6px'}, |
| 75 {at: 0.6, is: '12px'}, |
| 76 {at: 1, is: '20px'}, |
| 77 {at: 1.5, is: '30px'}, |
| 78 ]); |
| 79 |
| 80 assertInterpolation({ |
| 81 property: '-webkit-column-gap', |
30 from: '0px', | 82 from: '0px', |
31 to: '100px' | 83 to: '100px' |
32 }, [ | 84 }, [ |
33 {at: -0.3, is: '0'}, // -webkit-column-gap can't be negative. | 85 {at: -0.3, is: '0'}, // -webkit-column-gap can't be negative. |
34 {at: 0, is: '0'}, | 86 {at: 0, is: '0'}, |
35 {at: 0.3, is: '30px'}, | 87 {at: 0.3, is: '30px'}, |
36 {at: 0.6, is: '60px'}, | 88 {at: 0.6, is: '60px'}, |
37 {at: 1, is: '100px'}, | 89 {at: 1, is: '100px'}, |
38 {at: 1.5, is: '150px'} | 90 {at: 1.5, is: '150px'} |
39 ]); | 91 ]); |
40 </script> | 92 </script> |
41 </body> | 93 </body> |
OLD | NEW |