| <!DOCTYPE html> |
| <meta charset="UTF-8"> |
| <body></body> |
| <script src="../interpolation/resources/interpolation-test.js"></script> |
| <script> |
| assertComposition({ |
| property: 'text-indent', |
| underlying: '100%', |
| addFrom: '50px', |
| addTo: '150px', |
| }, [ |
| {at: -0.3, is: 'calc(100% + 20px)'}, |
| {at: 0, is: 'calc(100% + 50px)'}, |
| {at: 0.3, is: 'calc(100% + 80px)'}, |
| {at: 0.6, is: 'calc(100% + 110px)'}, |
| {at: 1, is: 'calc(100% + 150px)'}, |
| {at: 1.5, is: 'calc(100% + 200px)'}, |
| ]); |
| |
| assertComposition({ |
| property: 'text-indent', |
| underlying: '250px', |
| addFrom: '50px', |
| replaceTo: '100px', |
| }, [ |
| {at: -0.3, is: '360px'}, |
| {at: 0, is: '300px'}, |
| {at: 0.3, is: '240px'}, |
| {at: 0.6, is: '180px'}, |
| {at: 1, is: '100px'}, |
| {at: 1.5, is: '0px'}, |
| ]); |
| |
| assertComposition({ |
| property: 'text-indent', |
| underlying: '50%', |
| replaceFrom: '-100%', |
| addTo: '50%', |
| }, [ |
| {at: -0.3, is: '-160%'}, |
| {at: 0, is: '-100%'}, |
| {at: 0.3, is: '-40%'}, |
| {at: 0.5, is: '0%'}, |
| {at: 0.6, is: '20%'}, |
| {at: 1, is: '100%'}, |
| {at: 1.5, is: '200%'}, |
| ]); |
| |
| assertComposition({ |
| property: 'text-indent', |
| underlying: '250px', |
| addFrom: '50px each-line hanging', |
| replaceTo: '150px hanging each-line', |
| }, [ |
| {at: -0.3, is: '20px hanging each-line'}, |
| {at: 0, is: '50px hanging each-line'}, |
| {at: 0.3, is: '80px hanging each-line'}, |
| {at: 0.6, is: '110px hanging each-line'}, |
| {at: 1, is: '150px hanging each-line'}, |
| {at: 1.5, is: '200px hanging each-line'}, |
| ]); |
| |
| assertComposition({ |
| property: 'text-indent', |
| underlying: '250px each-line', |
| addFrom: '50px each-line', |
| replaceTo: '150px hanging', |
| }, [ |
| {at: -0.3, is: '300px each-line'}, |
| {at: 0, is: '300px each-line'}, |
| {at: 0.3, is: '300px each-line'}, |
| {at: 0.6, is: '150px hanging'}, |
| {at: 1, is: '150px hanging'}, |
| {at: 1.5, is: '150px hanging'}, |
| ]); |
| </script> |
| </body> |