position-valid.tentative.html (2425B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Values and Units Module Level 5: parsing <position> with valid values</title> 6 <link rel="author" title="Sam Weinig" href="mailto:sam@webkit.org"> 7 <link rel="help" href="https://drafts.csswg.org/css-values-5/#position"> 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 const property = "object-position"; 15 16 test_valid_value(property, "10%", "10% center"); 17 test_valid_value(property, "right 30% top 60px"); 18 test_valid_value(property, "-20% -30px"); 19 test_valid_value(property, "30px center"); 20 test_valid_value(property, "40px top"); 21 test_valid_value(property, "bottom 10% right 20%", "right 20% bottom 10%"); 22 test_valid_value(property, "bottom right", "right bottom"); 23 test_valid_value(property, "center 50px", "center 50px"); 24 test_valid_value(property, "center bottom", "center bottom"); 25 test_valid_value(property, "center left", "left center"); 26 test_valid_value(property, "left", "left center"); 27 test_valid_value(property, "left bottom", "left bottom"); 28 test_valid_value(property, "left center", "left center"); 29 test_valid_value(property, "right 40%", "right 40%"); 30 test_valid_value(property, "top", "center top"); 31 test_valid_value(property, "top center", "center top"); 32 test_valid_value(property, "center", "center center"); 33 test_valid_value(property, "center center", "center center"); 34 35 test_valid_value(property, "x-start", "x-start center"); 36 test_valid_value(property, "x-start 10px"); 37 test_valid_value(property, "x-start 10% top 20px"); 38 test_valid_value(property, "top 20px x-start 10%", "x-start 10% top 20px"); 39 test_valid_value(property, "x-end", "x-end center"); 40 test_valid_value(property, "x-end 10%"); 41 test_valid_value(property, "x-end 10px top 20px"); 42 test_valid_value(property, "top 20px x-end 10px", "x-end 10px top 20px"); 43 test_valid_value(property, "y-start", "center y-start"); 44 test_valid_value(property, "10px y-start"); 45 test_valid_value(property, "left 10px y-start 20%"); 46 test_valid_value(property, "y-start 20px left 10px", "left 10px y-start 20px"); 47 test_valid_value(property, "y-end", "center y-end"); 48 test_valid_value(property, "10px y-end"); 49 test_valid_value(property, "left 10px y-end 20%"); 50 test_valid_value(property, "y-end 20% left 10px", "left 10px y-end 20%"); 51 </script> 52 </body> 53 </html>