perspective-origin-valid.html (1766B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Transform Module Level 2: parsing perspective-origin with valid values</title> 6 <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#perspective-origin-property"> 7 <meta name="assert" content="perspective-origin supports the full '<position>' grammar."> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src="/css/support/parsing-testcommon.js"></script> 11 </head> 12 <body> 13 <script> 14 // Blink and WebKit append center. Edge and Firefox append 50% 15 test_valid_value("perspective-origin", "10%", ["10% center", "10% 50%"]); 16 test_valid_value("perspective-origin", "20% 30px"); 17 test_valid_value("perspective-origin", "30px center"); 18 test_valid_value("perspective-origin", "40px top"); 19 test_valid_value("perspective-origin", "bottom 10% right 20%", "right 20% bottom 10%"); 20 test_valid_value("perspective-origin", "bottom right", "right bottom"); 21 test_valid_value("perspective-origin", "center", ["center center", "center 50%"]); 22 test_valid_value("perspective-origin", "center 50px"); 23 test_valid_value("perspective-origin", "center bottom"); 24 test_valid_value("perspective-origin", "center center"); 25 test_valid_value("perspective-origin", "center left", "left center"); 26 test_valid_value("perspective-origin", "left", ["left center", "left 50%"]); 27 test_valid_value("perspective-origin", "left bottom"); 28 test_valid_value("perspective-origin", "left center"); 29 test_valid_value("perspective-origin", "right 40%"); 30 test_valid_value("perspective-origin", "right 30% top 60px"); 31 test_valid_value("perspective-origin", "top", ["center top", "50% top"]); 32 test_valid_value("perspective-origin", "top center", "center top"); 33 </script> 34 </body> 35 </html>