offset-distance-computed.html (1024B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Motion Path Module Level 1: getComputedStyle().offsetDistance</title> 6 <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> 7 <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-distance-property"> 8 <meta name="assert" content="offset-distance is a computed '<length-percentage>'."> 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("offset-distance", "10px"); 22 test_computed_value("offset-distance", "20%"); 23 test_computed_value("offset-distance", "calc(40% - 30px)"); 24 test_computed_value("offset-distance", "0", "0px"); 25 test_computed_value('offset-distance', 'calc(10px - 0.5em)', '-10px'); 26 test_computed_value('offset-distance', 'calc(10px + 0.5em)', '30px'); 27 </script> 28 </body> 29 </html>