grid-gap-computed.html (1283B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Box Alignment Level 3: getComputedStyle().gridGap</title> 6 <link rel="help" href="https://drafts.csswg.org/css-align/#grid-gap-legacy"> 7 <link rel="author" title="Takuya Kurimoto" href="mailto:takuya004869@gmail.com"> 8 <meta name="assert" content="grid-gap computed value is a pair of keyword or <length-percentage> values."> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <script src="/css/support/computed-testcommon.js"></script> 12 <style> 13 #target { 14 font-size: 40px; 15 } 16 </style> 17 </head> 18 <body> 19 <div id="target"></div> 20 <script> 21 test_computed_value("grid-gap", "normal"); 22 test_computed_value("grid-gap", "10px"); 23 test_computed_value("grid-gap", "20%"); 24 test_computed_value("grid-gap", "calc(20% + 10px)"); 25 test_computed_value("grid-gap", "calc(-0.5em + 10px)", "0px"); 26 test_computed_value("grid-gap", "calc(0.5em + 10px)", "30px"); 27 28 test_computed_value("grid-gap", "normal 10px"); 29 test_computed_value("grid-gap", "10px 20%"); 30 test_computed_value("grid-gap", "20% calc(20% + 10px)"); 31 test_computed_value("grid-gap", "calc(20% + 10px) normal"); 32 33 test_computed_value("grid-gap", "calc(-0.5em + 10px) calc(0.5em + 10px)", "0px 30px"); 34 </script> 35 </body> 36 </html>