gap-animation-004.html (1287B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Box Alignment Test: gap test animation</title> 4 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com"> 5 <link rel="help" href="https://www.w3.org/TR/css-align-3/#column-row-gap"> 6 <link rel="help" href="https://www.w3.org/TR/css-animations-1/#keyframes"> 7 <meta name="assert" content="This test checks that gap property is interpolable for each longhand (row-gap and column-gap) independently."> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <style> 11 @keyframes gap-100-200-to-200-400 { 12 from { gap: 100px 200px; } 13 to { gap: 200px 400px; } 14 } 15 16 #target { 17 animation-name: gap-100-200-to-200-400; 18 animation-timing-function: linear; 19 animation-duration: 2s; 20 animation-delay: -1s; 21 animation-play-state: paused; 22 } 23 </style> 24 <body> 25 <div id="target"></div> 26 <div id="log"></div> 27 28 <script> 29 test( 30 function(){ 31 var target = document.getElementById("target"); 32 assert_equals(getComputedStyle(target).gap, "150px 300px"); 33 assert_equals(getComputedStyle(target).rowGap, "150px"); 34 assert_equals(getComputedStyle(target).columnGap, "300px"); 35 }, "gap is interpolable"); 36 </script> 37 </body>