Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<meta charset="UTF-8">
<title>hyphenate-limit-lines interpolation</title>
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
<meta name="assert" content="hyphenate-limit-lines supports animation as an integer between two integer values.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<style>
.parent {
hyphenate-limit-lines: 30;
}
.target {
hyphenate-limit-lines: 10;
}
</style>
<body></body>
<script>
test_interpolation({
property: 'hyphenate-limit-lines',
from: neutralKeyframe,
to: '20',
}, [
{at: -0.5, expect: '5'},
{at: 0, expect: '10'},
{at: 0.3, expect: '13'},
{at: 0.7, expect: '17'},
{at: 1, expect: '20'},
{at: 1.5, expect: '25'},
]);
test_interpolation({
property: 'hyphenate-limit-lines',
from: 'inherit',
to: '20',
}, [
{at: -0.5, expect: '35'},
{at: 0, expect: '30'},
{at: 0.3, expect: '27'},
{at: 0.7, expect: '23'},
{at: 1, expect: '20'},
{at: 1.5, expect: '15'},
]);
test_interpolation({
property: 'hyphenate-limit-lines',
from: 'unset',
to: '20',
}, [
{at: -0.5, expect: '35'},
{at: 0, expect: '30'},
{at: 0.3, expect: '27'},
{at: 0.7, expect: '23'},
{at: 1, expect: '20'},
{at: 1.5, expect: '15'},
]);
test_interpolation({
property: 'hyphenate-limit-lines',
from: '10',
to: '0',
}, [
{at: -0.5, expect: '15'},
{at: 0, expect: '10'},
{at: 0.3, expect: '7'},
{at: 0.7, expect: '3'},
{at: 1, expect: '0'},
// Only non-negative integers are valid.
{at: 1.5, expect: '0'},
]);
</script>