offset-parsing-valid.html (2865B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Motion Path Module Level 1: parsing offset with valid values</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-shorthand"> 8 <meta name="assert" content="offset supports the full grammar from the spec."> 9 <script src="/resources/testharness.js"></script> 10 <script src="/resources/testharnessreport.js"></script> 11 <script src="/css/support/parsing-testcommon.js"></script> 12 </head> 13 <body> 14 <script> 15 test_valid_value("offset", "100px none auto 90deg", "100px center none auto 90deg"); 16 test_valid_value("offset", "100px", "100px center"); 17 test_valid_value("offset", "normal none reverse", "none reverse"); 18 test_valid_value("offset", "auto"); 19 test_valid_value("offset", "center bottom path(\"M 1 2 V 3 Z\")"); 20 test_valid_value("offset", "center center path(\"M 0 0 L 100 100 M 100 200 L 200 200 Z L 300 300 Z\") 100% 90deg / left bottom"); 21 test_valid_value("offset", "left bottom ray(0rad closest-corner) 10px auto 30deg / right bottom"); 22 test_valid_value("offset", "left top"); 23 test_valid_value("offset", "none 30deg reverse", "none reverse 30deg"); 24 test_valid_value("offset", "none 50px reverse 30deg"); 25 test_valid_value("offset", "none calc(20% + 10px) auto", "none calc(20% + 10px)"); 26 test_valid_value("offset", "none reverse"); 27 test_valid_value("offset", "path(\"M 0 0 H 1\") -200% auto", "path(\"M 0 0 H 1\") -200%"); 28 test_valid_value("offset", "path(\"M 0 0 H 1\") -200%"); 29 test_valid_value("offset", "path('M 0 0 H 1') 50px", "path(\"M 0 0 H 1\") 50px"); 30 test_valid_value("offset", "path(\"M 0 0 H 1\") auto", "path(\"M 0 0 H 1\")"); 31 test_valid_value("offset", "path(\"M 0 0 H 1\") auto 0deg", "path(\"M 0 0 H 1\")"); 32 test_valid_value("offset", "path(\"M 0 0 H 1\") auto 0rad", "path(\"M 0 0 H 1\")"); 33 test_valid_value("offset", "path(\"M 0 0 H 1\") auto 0.5turn", "path(\"M 0 0 H 1\") auto 0.5turn"); 34 test_valid_value("offset", "path('M 0 0 H 1') reverse 30deg 50px", "path(\"M 0 0 H 1\") 50px reverse 30deg"); 35 test_valid_value("offset", "path(\"M 0 0 H 1\")"); 36 test_valid_value("offset", "path('m 20 0 h 100') -7rad 8px / auto", "path(\"m 20 0 h 100\") 8px -7rad"); 37 test_valid_value("offset", "path('m 0 30 v 100') -7rad 8px / left top", "path(\"m 0 30 v 100\") 8px -7rad / left top"); 38 test_valid_value("offset", "path('m 0 0 h 100') -7rad 8px", "path(\"m 0 0 h 100\") 8px -7rad"); 39 test_valid_value("offset", "path(\"M 0 0 H 100\") 100px 0deg"); 40 test_valid_value("offset", "path( 'm 1 2 v 3.00 z')", "path(\"m 1 2 v 3 Z\")"); 41 test_valid_value("offset", "ray(farthest-corner 90deg) 1%", "ray(90deg farthest-corner) 1%"); 42 test_valid_value("offset", "ray(sides 0deg) 50% 90deg auto", "ray(0deg sides) 50% auto 90deg"); 43 test_valid_value("offset", "right bottom / left top"); 44 </script> 45 </body> 46 </html>