blob: c6eedcfe20f9f89f821574506445e9476f9eee83 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.parent {
min-height: 30px;
}
.target {
width: 10px;
height: 0px;
background-color: black;
display: inline-block;
min-height: 10px;
}
.expected {
background-color: green;
}
</style>
<body>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'min-height',
from: neutralKeyframe,
to: '20px',
}, [
{at: -0.5, is: '5px'},
{at: 0, is: '10px'},
{at: 0.3, is: '13px'},
{at: 0.6, is: '16px'},
{at: 1, is: '20px'},
{at: 1.5, is: '25px'},
]);
assertNoInterpolation({
property: 'min-height',
from: 'initial',
to: '20px',
});
assertInterpolation({
property: 'min-height',
from: 'inherit',
to: '20px',
}, [
{at: -0.5, is: '35px'},
{at: 0, is: '30px'},
{at: 0.3, is: '27px'},
{at: 0.6, is: '24px'},
{at: 1, is: '20px'},
{at: 1.5, is: '15px'},
]);
assertNoInterpolation({
property: 'min-height',
from: 'unset',
to: '20px',
});
assertInterpolation({
property: 'min-height',
from: '0px',
to: '100px',
}, [
{at: -0.5, is: '0'}, // CSS min-height can't be negative.
{at: 0, is: '0'},
{at: 0.3, is: '30px'},
{at: 0.6, is: '60px'},
{at: 1, is: '100px'},
{at: 1.5, is: '150px'}
]);
</script>
</body>