Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<!DOCTYPE html>
<title>path-length interpolation</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<body>
<script>
// Clamps at the non-negative boundary when interpolating from 0.
test_interpolation({
property: 'path-length',
from: '0px',
to: '100px',
}, [
{at: -0.3, expect: '0px'},
{at: 0, expect: '0px'},
{at: 0.5, expect: '50px'},
{at: 1, expect: '100px'},
{at: 1.5, expect: '150px'},
]);
// Interpolates between different units (2em = 32px at font-size 16px).
test_interpolation({
property: 'path-length',
from: '10px',
to: '2em',
}, [
{at: 0, expect: '10px'},
{at: 0.5, expect: '21px'},
{at: 1, expect: '32px'},
]);
</script>
</body>