blob: 92881cb0c9e41b393fc33d49ee235f6eaae29f88 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.parent {
bottom: 30px;
}
.target {
position: relative;
width: 100px;
height: 100px;
background-color: black;
display: inline-block;
margin: 20px 5px 20px 0px;
bottom: 10px;
}
.expected {
background-color: green;
}
</style>
<body>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'bottom',
from: neutralKeyframe,
to: '20px',
}, [
{at: -0.3, is: '7px'},
{at: 0, is: '10px'},
{at: 0.5, is: '15px'},
{at: 1, is: '20px'},
{at: 1.5, is: '25px'},
]);
assertNoInterpolation({
property: 'bottom',
from: 'initial',
to: '20px',
});
assertInterpolation({
property: 'bottom',
from: 'inherit',
to: '20px',
}, [
{at: -0.3, is: '33px'},
{at: 0, is: '30px'},
{at: 0.5, is: '25px'},
{at: 1, is: '20px'},
{at: 1.5, is: '15px'},
]);
assertNoInterpolation({
property: 'bottom',
from: 'unset',
to: '20px',
});
assertInterpolation({
property: 'bottom',
from: '-10px',
to: '10px'
}, [
{at: -0.3, is: '-16px'},
{at: 0, is: '-10px'},
{at: 0.5, is: '0px'},
{at: 1, is: '10px'},
{at: 1.5, is: '20px'}
]);
</script>
</body>