| <!DOCTYPE html> |
| <meta charset="UTF-8"> |
| <style> |
| .target { |
| background-image: url(), url(); |
| } |
| </style> |
| <body> |
| <script src="../interpolation/resources/interpolation-test.js"></script> |
| <script> |
| assertComposition({ |
| property: 'background-size', |
| underlying: '40px 40px', |
| addFrom: '60px 60px, 260px 260px', |
| addTo: '160px 160px', |
| }, [ |
| {at: -0.25, is: '75px 75px, 325px 325px'}, |
| {at: 0, is: '100px 100px, 300px 300px'}, |
| {at: 0.25, is: '125px 125px, 275px 275px'}, |
| {at: 0.5, is: '150px 150px, 250px 250px'}, |
| {at: 0.75, is: '175px 175px, 225px 225px'}, |
| {at: 1, is: '200px 200px, 200px 200px'}, |
| {at: 1.25, is: '225px 225px, 175px 175px'}, |
| ]); |
| |
| assertComposition({ |
| property: 'background-size', |
| underlying: '20% 40%', |
| addFrom: '40px 80px, 180% 160%', |
| addTo: '80% 40%', |
| }, [ |
| {at: -0.25, is: '50px calc(100px + 30%), 225% 230%'}, |
| {at: 0, is: 'calc(40px + 20%) calc(80px + 40%), 200% 200%'}, |
| {at: 0.25, is: 'calc(30px + 40%) calc(60px + 50%), 175% 170%'}, |
| {at: 0.5, is: 'calc(20px + 60%) calc(40px + 60%), 150% 140%'}, |
| {at: 0.75, is: 'calc(10px + 80%) calc(20px + 70%), 125% 110%'}, |
| {at: 1, is: '100% 80%, 100% 80%'}, |
| {at: 1.25, is: 'calc(-10px + 120%) calc(-20px + 90%), 75% 50%'}, |
| ]); |
| |
| assertComposition({ |
| property: 'background-size', |
| underlying: '40px 40px', |
| replaceFrom: '100px 100px', |
| addTo: '160px 160px', |
| }, [ |
| {at: -0.25, is: '75px 75px, 75px 75px'}, |
| {at: 0, is: '100px 100px, 100px 100px'}, |
| {at: 0.25, is: '125px 125px, 125px 125px'}, |
| {at: 0.5, is: '150px 150px, 150px 150px'}, |
| {at: 0.75, is: '175px 175px, 175px 175px'}, |
| {at: 1, is: '200px 200px, 200px 200px'}, |
| {at: 1.25, is: '225px 225px, 225px 225px'}, |
| ]); |
| |
| assertComposition({ |
| property: 'background-size', |
| underlying: '40px 40px', |
| addFrom: '60px 60px', |
| replaceTo: '200px 200px', |
| }, [ |
| {at: -0.25, is: '75px 75px, 75px 75px'}, |
| {at: 0, is: '100px 100px, 100px 100px'}, |
| {at: 0.25, is: '125px 125px, 125px 125px'}, |
| {at: 0.5, is: '150px 150px, 150px 150px'}, |
| {at: 0.75, is: '175px 175px, 175px 175px'}, |
| {at: 1, is: '200px 200px, 200px 200px'}, |
| {at: 1.25, is: '225px 225px, 225px 225px'}, |
| ]); |
| |
| assertComposition({ |
| property: 'background-size', |
| underlying: 'auto, contain', |
| addFrom: '100px 150px', |
| replaceTo: '200px 250px', |
| }, [ |
| {at: -0.25, is: '75px 125px, 75px 125px'}, |
| {at: 0, is: '100px 150px, 100px 150px'}, |
| {at: 0.25, is: '125px 175px, 125px 175px'}, |
| {at: 0.5, is: '150px 200px, 150px 200px'}, |
| {at: 0.75, is: '175px 225px, 175px 225px'}, |
| {at: 1, is: '200px 250px, 200px 250px'}, |
| {at: 1.25, is: '225px 275px, 225px 275px'}, |
| ]); |
| |
| assertComposition({ |
| property: 'background-size', |
| underlying: 'auto 100px, contain', |
| addFrom: neutralKeyframe, |
| replaceTo: 'auto 200px, contain', |
| }, [ |
| {at: -0.25, is: 'auto 75px, contain'}, |
| {at: 0, is: 'auto 100px, contain'}, |
| {at: 0.25, is: 'auto 125px, contain'}, |
| {at: 0.5, is: 'auto 150px, contain'}, |
| {at: 0.75, is: 'auto 175px, contain'}, |
| {at: 1, is: 'auto 200px, contain'}, |
| {at: 1.25, is: 'auto 225px, contain'}, |
| ]); |
| </script> |
| </body> |