padding-valid.html (1088B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS basic box model: parsing padding with valid values</title> 6 <link rel="help" href="https://drafts.csswg.org/css-box-3/#propdef-padding"> 7 <meta name="assert" content="padding supports the full grammar '<length-percentage>{1,4}'."> 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("padding", "10px"); 15 test_valid_value("padding", "10px 20px 30px 40px"); 16 test_valid_value("padding", "calc(2em + 3ex)"); 17 18 test_valid_value("padding-top", "10px"); 19 test_valid_value("padding-right", "20px"); 20 test_valid_value("padding-bottom", "30px"); 21 test_valid_value("padding-left", "40px"); 22 23 test_valid_value("padding", "20%"); 24 test_valid_value("padding", "10px 20% 30% 40px"); 25 test_valid_value("padding-right", "20%"); 26 27 // https://drafts.csswg.org/css-values-4/#sort-a-calculations-children 28 test_valid_value("padding-right", "calc(2em + 3%)", "calc(3% + 2em)"); 29 </script> 30 </body> 31 </html>