| <!DOCTYPE html> |
| <meta charset="UTF-8"> |
| <style> |
| .parent { |
| row-gap: 90px; |
| } |
| .target { |
| row-gap: 10px; |
| } |
| .expected div { |
| opacity: 0.7; |
| } |
| .target > div { |
| height: 20px; |
| background-color: black; |
| } |
| .target.expected > div { |
| background-color: green; |
| } |
| </style> |
| <body> |
| <template id='target-template'> |
| <div></div><div></div> |
| </template> |
| <script src='resources/interpolation-test.js'></script> |
| <script> |
| assertInterpolation({ |
| property: 'row-gap', |
| from: neutralKeyframe, |
| to: '40px', |
| }, [ |
| {at: -0.3, is: '1px'}, |
| {at: 0, is: '10px'}, |
| {at: 0.3, is: '19px'}, |
| {at: 0.6, is: '28px'}, |
| {at: 1, is: '40px'}, |
| {at: 1.5, is: '55px'}, |
| ]); |
| |
| assertNoInterpolation({ |
| property: 'row-gap', |
| from: 'initial', |
| to: '20px', |
| }); |
| |
| assertInterpolation({ |
| property: 'row-gap', |
| from: 'inherit', |
| to: '20px', |
| }, [ |
| {at: -0.3, is: '111px'}, |
| {at: 0, is: '90px'}, |
| {at: 0.3, is: '69px'}, |
| {at: 0.6, is: '48px'}, |
| {at: 1, is: '20px'}, |
| {at: 1.5, is: '0px'}, |
| ]); |
| |
| assertNoInterpolation({ |
| property: 'row-gap', |
| from: 'unset', |
| to: '20px', |
| }); |
| |
| assertNoInterpolation({ |
| property: 'row-gap', |
| from: 'normal', |
| to: '20px', |
| }); |
| |
| assertInterpolation({ |
| property: 'row-gap', |
| from: '0px', |
| to: '100px' |
| }, [ |
| {at: -0.3, is: '0'}, // row-gap can't be negative. |
| {at: 0, is: '0'}, |
| {at: 0.3, is: '30px'}, |
| {at: 0.6, is: '60px'}, |
| {at: 1, is: '100px'}, |
| {at: 1.5, is: '150px'} |
| ]); |
| </script> |
| </body> |