blob: 99004e736b7d4b1f70670dcdfe734d6bde1eb9b7 [file] [log] [blame]
<!DOCTYPE html>
<body>
<style>
.parent {
orphans: 30;
}
.target {
orphans: 10;
}
</style>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'orphans',
from: neutralKeyframe,
to: '20',
}, [
{at: -0.5, is: '5'},
{at: 0, is: '10'},
{at: 0.3, is: '13'},
{at: 0.7, is: '17'},
{at: 1, is: '20'},
{at: 1.5, is: '25'},
]);
assertInterpolation({
property: 'orphans',
from: 'initial',
to: '20',
}, [
{at: -0.5, is: '1'},
{at: 0, is: '2'},
{at: 0.3, is: '7'},
{at: 0.7, is: '15'},
{at: 1, is: '20'},
{at: 1.5, is: '29'},
]);
assertInterpolation({
property: 'orphans',
from: 'inherit',
to: '20',
}, [
{at: -0.5, is: '35'},
{at: 0, is: '30'},
{at: 0.3, is: '27'},
{at: 0.7, is: '23'},
{at: 1, is: '20'},
{at: 1.5, is: '15'},
]);
assertInterpolation({
property: 'orphans',
from: 'unset',
to: '20',
}, [
{at: -0.5, is: '35'},
{at: 0, is: '30'},
{at: 0.3, is: '27'},
{at: 0.7, is: '23'},
{at: 1, is: '20'},
{at: 1.5, is: '15'},
]);
assertInterpolation({
property: 'orphans',
from: '10',
to: '1'
}, [
{at: -0.5, is: '15'},
{at: 0, is: '10'},
{at: 0.3, is: '7'},
{at: 0.7, is: '4'},
// Only positive integers are valid
{at: 1, is: '1'},
{at: 1.5, is: '1'}
]);
</script>