offset-anchor-computed.html (1578B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Motion Path Module Level 1: getComputedStyle().offsetAnchor</title> 6 <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-anchor-property"> 7 <meta name="assert" content="offset-anchor is 'auto' or a computed position."> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/css/support/computed-testcommon.js"></script> 11 <style> 12 #target { 13 font-size: 40px; 14 } 15 </style> 16 </head> 17 <body> 18 <div id="target"></div> 19 <script> 20 test_computed_value("offset-anchor", "auto"); 21 22 test_computed_value("offset-anchor", "left bottom", "0% 100%"); 23 test_computed_value("offset-anchor", "center center", "50% 50%"); 24 test_computed_value("offset-anchor", "right center", "100% 50%"); 25 test_computed_value("offset-anchor", "center top", "50% 0%"); 26 test_computed_value("offset-anchor", "center bottom", "50% 100%"); 27 test_computed_value("offset-anchor", "calc(20% - 5em) center", "calc(20% - 200px) 50%"); 28 test_computed_value("offset-anchor", "right 4em", "100% 160px"); 29 test_computed_value("offset-anchor", "10px 20%"); 30 test_computed_value("offset-anchor", "left -10px top -20%", "-10px -20%"); 31 test_computed_value("offset-anchor", "right 10% bottom 20em", "90% calc(100% - 800px)"); 32 test_computed_value("offset-anchor", "top 10px right -20%", "120% 10px"); 33 test_computed_value("offset-anchor", "left 10% bottom 20em", "10% calc(100% - 800px)"); 34 test_computed_value('offset-anchor', 'calc(10px - 0.5em) calc(10px + 0.5em)', '-10px 30px'); 35 </script> 36 </body> 37 </html>