computed-keyframes-shorthands.html (841B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <title>Calculating computed keyframes: Shorthand properties</title> 4 <link rel="help" href="https://drafts.csswg.org/web-animations-1/#calculating-computed-keyframes"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <script src="../../testcommon.js"></script> 8 <body> 9 <div id="log"></div> 10 <div id="target"></div> 11 <script> 12 'use strict'; 13 14 test(t => { 15 const div = createDiv(t); 16 div.style.opacity = '0'; 17 18 const animation = div.animate({ all: 'initial' }, 100 * MS_PER_SEC); 19 animation.currentTime = 50 * MS_PER_SEC; 20 21 assert_approx_equals( 22 parseFloat(getComputedStyle(div).opacity), 23 0.5, 24 0.0001, 25 'Should be half way through an opacity animation' 26 ); 27 }, 'It should be possible to animate the all shorthand'); 28 29 </script> 30 </body>