blob: 934ee21b917df00445152fa7ff55c5ebff748cac [file] [log] [blame]
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.parent {
border-image-outset: 10px;
}
.target {
width: 50px;
height: 50px;
background-color: black;
display: inline-block;
border: 25px;
margin-right: 50px;
border-image-slice: 30%;
background-clip: content-box;
border-image-source: linear-gradient(45deg, pink, blue, white, black, green);
border-image-outset: 1px;
}
.expected {
background-color: green;
}
</style>
<body>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'border-image-outset',
from: neutralKeyframe,
to: '2px',
}, [
{at: -0.3, is: '0.7px'},
{at: 0, is: '1px'},
{at: 0.3, is: '1.3px'},
{at: 0.6, is: '1.6px'},
{at: 1, is: '2px'},
{at: 1.5, is: '2.5px'},
]);
assertInterpolation({
property: 'border-image-outset',
from: 'initial',
to: '2px',
}, [
{at: -0.3, is: '0px'}, // Non-negative
{at: 0, is: '0px'},
{at: 0.3, is: '0.6px'},
{at: 0.6, is: '1.2px'},
{at: 1, is: '2px'},
{at: 1.5, is: '3px'},
]);
assertInterpolation({
property: 'border-image-outset',
from: 'inherit',
to: '2px',
}, [
{at: -0.3, is: '12.4px'},
{at: 0, is: '10px'},
{at: 0.3, is: '7.6px'},
{at: 0.6, is: '5.2px'},
{at: 1, is: '2px'},
{at: 1.5, is: '0px'},
]);
assertInterpolation({
property: 'border-image-outset',
from: 'unset',
to: '2px',
}, [
{at: -0.3, is: '0px'}, // Non-negative
{at: 0, is: '0px'},
{at: 0.3, is: '0.6px'},
{at: 0.6, is: '1.2px'},
{at: 1, is: '2px'},
{at: 1.5, is: '3px'},
]);
assertInterpolation({
property: 'border-image-outset',
from: '0px',
to: '5px',
}, [
{at: -0.3, is: '0px'}, // Non-negative
{at: 0, is: '0px'},
{at: 0.3, is: '1.5px'},
{at: 0.6, is: '3px'},
{at: 1, is: '5px'},
{at: 1.5, is: '7.5px'},
]);
assertInterpolation({
property: 'border-image-outset',
from: '0',
to: '1',
}, [
{at: -0.3, is: '0'}, // Non-negative
{at: 0, is: '0'},
{at: 0.3, is: '0.3'},
{at: 0.6, is: '0.6'},
{at: 1, is: '1'},
{at: 1.5, is: '1.5'},
]);
assertInterpolation({
property: 'border-image-outset',
from: '1 2 3px 4px',
to: '101 102 103px 104px',
}, [
{at: -0.3, is: '0 0 0px 0px'}, // Non-negative
{at: 0, is: '1 2 3px 4px'},
{at: 0.3, is: '31 32 33px 34px'},
{at: 0.6, is: '61 62 63px 64px'},
{at: 1, is: '101 102 103px 104px'},
{at: 1.5, is: '151 152 153px 154px'},
]);
</script>
</body>