rule-inset-computed.html (1721B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Gaps: rule-inset shorthands getComputedStyle()</title> 6 <link rel="author" title="Sam Davis Omekara Jr." href="mailto:samomekarajr@microsoft.com"> 7 <link rel="help" href="https://drafts.csswg.org/css-gaps-1/#outset"> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/css/support/computed-testcommon.js"></script> 11 <script src="/css/support/inheritance-testcommon.js"></script> 12 </head> 13 <body> 14 <div id="target"></div> 15 <style> 16 #target { 17 font-size: 40px; 18 } 19 </style> 20 <script> 21 const properties = ["column-rule-inset", "row-rule-inset", "rule-inset"]; 22 for (const property of properties) { 23 test_computed_value(property, "10px", "10px 10px / 10px 10px"); 24 test_computed_value(property, "-20px", "-20px -20px / -20px -20px"); 25 test_computed_value(property, "0.5em", "20px 20px / 20px 20px"); 26 test_computed_value(property, "calc(10px + 0.5em)", "30px 30px / 30px 30px"); 27 test_computed_value(property, "calc(10px - 0.5em)", "-10px -10px / -10px -10px"); 28 test_computed_value(property, "30%", "30% 30% / 30% 30%"); 29 test_computed_value(property, "calc(25% + 10px)", "calc(25% + 10px) calc(25% + 10px) / calc(25% + 10px) calc(25% + 10px)"); 30 test_computed_value(property, "10px 20px", "10px 20px / 10px 20px"); 31 test_computed_value(property, "10px 20px / 30px -10px"); 32 test_computed_value(property, "-10px -20px / 25% 24%"); 33 test_computed_value(property, "5% 10% / 15%", "5% 10% / 15% 15%"); 34 test_computed_value(property, "5% / 15% 20%", "5% 5% / 15% 20%"); 35 } 36 </script> 37 </body> 38 </html>