margin-invalid.html (988B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS basic box model: parsing margin with invalid values</title> 6 <link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org"> 7 <link rel="help" href="https://drafts.csswg.org/css-box-3/#propdef-margin"> 8 <meta name="assert" content="margin supports only the grammar '[ <length> | <percentage> | auto]{1,4}'."> 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_invalid_value("margin", "available"); 16 test_invalid_value("margin", "10px border-box"); 17 test_invalid_value("margin", "1% 2% 3% 4% 5%"); 18 19 test_invalid_value("margin-top", "calc(2em + 3ex) auto"); 20 test_invalid_value("margin-right", "auto calc(2em + 3ex) 20%"); 21 test_invalid_value("margin-bottom", "10px 20% calc(2em + 3ex) auto"); 22 test_invalid_value("margin-bottom-left", "none"); 23 </script> 24 </body> 25 </html>