blob: a7873a4390e4c16da1000c35560fa5744c5da110 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.parent {
outline-color: yellow;
}
.target {
width: 50px;
height: 50px;
background-color: black;
display: inline-block;
outline: 12px solid white;
margin: 12px 12px;
outline-color: blue;
}
.expected {
background-color: lime;
}
</style>
<body>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'outline-color',
from: neutralKeyframe,
to: 'green',
}, [
{at: -0.3, is: 'rgb(0, 0, 255)'},
{at: 0, is: 'rgb(0, 0, 255)'},
{at: 0.3, is: 'rgb(0, 38, 179)'},
{at: 0.6, is: 'rgb(0, 77, 102)'},
{at: 1, is: 'rgb(0, 128, 0)'},
{at: 1.5, is: 'rgb(0, 192, 0)'},
]);
assertInterpolation({
property: 'outline-color',
from: 'initial',
to: 'green',
}, [
{at: -0.3, is: 'rgb(0, 0, 0)'},
{at: 0, is: 'rgb(0, 0, 0)'},
{at: 0.3, is: 'rgb(0, 38, 0)'},
{at: 0.6, is: 'rgb(0, 77, 0)'},
{at: 1, is: 'rgb(0, 128, 0)'},
{at: 1.5, is: 'rgb(0, 192, 0)'},
]);
assertInterpolation({
property: 'outline-color',
from: 'inherit',
to: 'green',
}, [
{at: -0.3, is: 'rgb(255, 255, 0)'},
{at: 0, is: 'rgb(255, 255, 0)'},
{at: 0.3, is: 'rgb(179, 217, 0)'},
{at: 0.6, is: 'rgb(102, 179, 0)'},
{at: 1, is: 'rgb(0, 128, 0)'},
{at: 1.5, is: 'rgb(0, 65, 0)'},
]);
assertInterpolation({
property: 'outline-color',
from: 'unset',
to: 'green',
}, [
{at: -0.3, is: 'rgb(0, 0, 0)'},
{at: 0, is: 'rgb(0, 0, 0)'},
{at: 0.3, is: 'rgb(0, 38, 0)'},
{at: 0.6, is: 'rgb(0, 77, 0)'},
{at: 1, is: 'rgb(0, 128, 0)'},
{at: 1.5, is: 'rgb(0, 192, 0)'},
]);
assertInterpolation({
property: 'outline-color',
from: 'white',
to: 'orange'
}, [
{at: -0.3, is: 'white'},
{at: 0, is: 'white'},
{at: 0.3, is: 'rgb(255, 228, 179)'},
{at: 0.6, is: 'rgb(255, 201, 102)'},
{at: 1, is: 'orange'},
{at: 1.5, is: 'rgb(255, 120, 0)'},
]);
</script>
</body>