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-mask-box-image-outset: 30px; |
| 6 } |
4 .target { | 7 .target { |
5 width: 100px; | 8 width: 100px; |
6 height: 100px; | 9 height: 100px; |
7 background-color: black; | 10 background-color: black; |
8 display: inline-block; | 11 display: inline-block; |
9 border: 25px; | 12 border: 25px; |
10 margin-right: 50px; | 13 margin-right: 50px; |
11 -webkit-mask-box-image-slice: 30%; | 14 -webkit-mask-box-image-slice: 30%; |
12 -webkit-mask-box-image-source: linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0
, 0, 0, 1)); | 15 -webkit-mask-box-image-source: linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0
, 0, 0, 1)); |
| 16 -webkit-mask-box-image-outset: 10px; |
13 } | 17 } |
14 .expected { | 18 .expected { |
15 background-color: green; | 19 background-color: green; |
16 } | 20 } |
17 </style> | 21 </style> |
18 <body> | 22 <body> |
19 <script src="resources/interpolation-test.js"></script> | 23 <script src="resources/interpolation-test.js"></script> |
20 <script> | 24 <script> |
21 assertInterpolation({ | 25 assertInterpolation({ |
22 property: '-webkit-mask-box-image-outset', | 26 property: '-webkit-mask-box-image-outset', |
| 27 from: '', |
| 28 to: '20px', |
| 29 }, [ |
| 30 {at: -0.3, is: '7px'}, |
| 31 {at: 0, is: '10px'}, |
| 32 {at: 0.4, is: '14px'}, |
| 33 {at: 0.6, is: '16px'}, |
| 34 {at: 1, is: '20px'}, |
| 35 {at: 1.5, is: '25px'}, |
| 36 ]); |
| 37 |
| 38 assertInterpolation({ |
| 39 property: '-webkit-mask-box-image-outset', |
| 40 from: 'initial', |
| 41 to: '20px', |
| 42 }, [ |
| 43 {at: -0.3, is: '0px'}, |
| 44 {at: 0, is: '0px'}, |
| 45 {at: 0.4, is: '8px'}, |
| 46 {at: 0.6, is: '12px'}, |
| 47 {at: 1, is: '20px'}, |
| 48 {at: 1.5, is: '30px'}, |
| 49 ]); |
| 50 |
| 51 assertInterpolation({ |
| 52 property: '-webkit-mask-box-image-outset', |
| 53 from: 'inherit', |
| 54 to: '20px', |
| 55 }, [ |
| 56 {at: -0.3, is: '33px'}, |
| 57 {at: 0, is: '30px'}, |
| 58 {at: 0.4, is: '26px'}, |
| 59 {at: 0.6, is: '24px'}, |
| 60 {at: 1, is: '20px'}, |
| 61 {at: 1.5, is: '15px'}, |
| 62 ]); |
| 63 |
| 64 assertInterpolation({ |
| 65 property: '-webkit-mask-box-image-outset', |
| 66 from: 'unset', |
| 67 to: '20px', |
| 68 }, [ |
| 69 {at: -0.3, is: '0px'}, |
| 70 {at: 0, is: '0px'}, |
| 71 {at: 0.4, is: '8px'}, |
| 72 {at: 0.6, is: '12px'}, |
| 73 {at: 1, is: '20px'}, |
| 74 {at: 1.5, is: '30px'}, |
| 75 ]); |
| 76 |
| 77 assertInterpolation({ |
| 78 property: '-webkit-mask-box-image-outset', |
23 from: '0px', | 79 from: '0px', |
24 to: '50px', | 80 to: '50px', |
25 }, [ | 81 }, [ |
26 {at: -0.3, is: '0px'}, // CSS -webkit-mask-box-image-outset can't be negative. | 82 {at: -0.3, is: '0px'}, // CSS -webkit-mask-box-image-outset can't be negative. |
27 {at: 0, is: '0px'}, | 83 {at: 0, is: '0px'}, |
28 {at: 0.4, is: '20px'}, | 84 {at: 0.4, is: '20px'}, |
29 {at: 0.6, is: '30px'}, | 85 {at: 0.6, is: '30px'}, |
30 {at: 1, is: '50px'}, | 86 {at: 1, is: '50px'}, |
31 {at: 1.5, is: '75px'} | 87 {at: 1.5, is: '75px'} |
32 ]); | 88 ]); |
33 assertInterpolation({ | 89 assertInterpolation({ |
34 property: '-webkit-mask-box-image-outset', | 90 property: '-webkit-mask-box-image-outset', |
35 from: '0', | 91 from: '0', |
36 to: '50', | 92 to: '50', |
37 }, [ | 93 }, [ |
38 {at: -0.3, is: '0'}, // CSS -webkit-mask-box-image-outset can't be negative. | 94 {at: -0.3, is: '0'}, // CSS -webkit-mask-box-image-outset can't be negative. |
39 {at: 0, is: '0'}, | 95 {at: 0, is: '0'}, |
40 {at: 0.4, is: '20'}, | 96 {at: 0.4, is: '20'}, |
41 {at: 0.6, is: '30'}, | 97 {at: 0.6, is: '30'}, |
42 {at: 1, is: '50'}, | 98 {at: 1, is: '50'}, |
43 {at: 1.5, is: '75'} | 99 {at: 1.5, is: '75'} |
44 ]); | 100 ]); |
45 </script> | 101 </script> |
46 </body> | 102 </body> |
OLD | NEW |