background-position-y-valid.html (1569B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Backgrounds and Borders Module Level 4: parsing background-position-y with valid values</title> 6 <link rel="help" href="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-y"> 7 <meta name="assert" content="background-position-y supports the full grammar '[ center | [ top | bottom | y-start | y-end ]? <length-percentage>? ]#'."> 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 test_valid_value("background-position-y", "center"); 15 test_valid_value("background-position-y", "top"); 16 test_valid_value("background-position-y", "bottom"); 17 test_valid_value("background-position-y", "y-start"); 18 test_valid_value("background-position-y", "y-end"); 19 test_valid_value("background-position-y", "-20%"); 20 test_valid_value("background-position-y", "10px"); 21 test_valid_value("background-position-y", "0.5em"); 22 test_valid_value("background-position-y", "calc(10px - 0.5em)", "calc(-0.5em + 10px)"); 23 test_valid_value("background-position-y", "top -20%"); 24 test_valid_value("background-position-y", "bottom 10px"); 25 test_valid_value("background-position-y", "-20%, 10px"); 26 test_valid_value("background-position-y", "center, top, bottom"); 27 test_valid_value("background-position-y", "0.5em, y-start, y-end"); 28 test_valid_value("background-position-y", "calc(10px - 0.5em), top -20%, bottom 10px", "calc(-0.5em + 10px), top -20%, bottom 10px"); 29 </script> 30 </body> 31 </html>