Status: FAIL | Duration: 14ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/motion/offset-rotate-005.html
<!DOCTYPE html> <html class="reftest-wait"> <head> <title>CSS Motion Path: offset-rotate</title> <link rel="help" href="https://drafts.fxtf.org/motion-1/#offset-rotate-property"> <link rel="match" href="offset-rotate-ref.html"> <meta name="assert" content="This tests offset-rotate reverse <angle> with path()"> <meta name="viewport" content="width=device-width,initial-scale=1"> <style> #target { position: absolute; left: 300px; top: 100px; width: 300px; height: 200px; background-color: lime; transform-origin: 0px 0px; offset-rotate: reverse 60deg; } </style> <script> function test() { let target = document.getElementById('target'); // Get a path which has the same direction as "ray(-120deg ...)" let verticalMove = 100 * Math.tan(30 * Math.PI / 180); target.style.offsetPath = `path("m 0 0 l -100 ${verticalMove}")`; window.getComputedStyle(target).offsetPath; window.requestAnimationFrame(function() { document.documentElement.removeAttribute('class'); }); } </script> </head> <body onload='test()'> <div id="target"></div> </body> </html>
/css/motion/offset-rotate-ref.html
<!DOCTYPE html> <html> <head> <title>CSS Motion Path: offset-rotate</title> <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> <meta name="viewport" content="width=device-width,initial-scale=1"> <style> #target { position: absolute; left: 300px; top: 100px; width: 300px; height: 200px; background-color: lime; transform-origin: 0px 0px; transform: rotate(30deg); } </style> </head> <body> <div id="target"></div> </body> </html>