blob: bc96f7d9d11c09bbcd7ea64481edc18da02a838a [file] [log] [blame]
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.parent {
outline: solid 0px;
outline-offset: 30px;
}
.target {
width: 50px;
height: 50px;
background-color: black;
display: inline-block;
margin: 40px 0px 0px 40px;
outline: 4px solid orange;
outline-offset: 10px;
}
.expected {
background-color: green;
margin-right: 18px;
}
</style>
<body>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'outline-offset',
from: neutralKeyframe,
to: '20px',
}, [
{at: -0.3, is: '7px'},
{at: 0, is: '10px'},
{at: 0.3, is: '13px'},
{at: 0.6, is: '16px'},
{at: 1, is: '20px'},
{at: 1.5, is: '25px'},
]);
assertInterpolation({
property: 'outline-offset',
from: 'initial',
to: '20px',
}, [
{at: -0.3, is: '-6px'},
{at: 0, is: '0px'},
{at: 0.3, is: '6px'},
{at: 0.6, is: '12px'},
{at: 1, is: '20px'},
{at: 1.5, is: '30px'},
]);
assertInterpolation({
property: 'outline-offset',
from: 'inherit',
to: '20px',
}, [
{at: -0.3, is: '33px'},
{at: 0, is: '30px'},
{at: 0.3, is: '27px'},
{at: 0.6, is: '24px'},
{at: 1, is: '20px'},
{at: 1.5, is: '15px'},
]);
assertInterpolation({
property: 'outline-offset',
from: 'unset',
to: '20px',
}, [
{at: -0.3, is: '-6px'},
{at: 0, is: '0px'},
{at: 0.3, is: '6px'},
{at: 0.6, is: '12px'},
{at: 1, is: '20px'},
{at: 1.5, is: '30px'},
]);
assertInterpolation({
property: 'outline-offset',
from: '-5px',
to: '5px',
}, [
{at: -0.3, is: '-8px'},
{at: 0, is: '-5px'},
{at: 0.3, is: '-2px'},
{at: 0.6, is: '1px'},
{at: 1, is: '5px'},
{at: 1.5, is: '10px'},
]);
</script>
</body>