tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

margin-valid.html (1260B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS basic box model: parsing margin with valid 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 the full 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_valid_value("margin", "10px");
     16 test_valid_value("margin", "20%");
     17 test_valid_value("margin", "calc(2em + 3ex)");
     18 test_valid_value("margin", "auto");
     19 test_valid_value("margin", "-10px");
     20 test_valid_value("margin", "-20%");
     21 
     22 test_valid_value("margin", "calc(2em + 3ex) auto");
     23 test_valid_value("margin", "auto calc(2em + 3ex) 20%");
     24 test_valid_value("margin", "10px 20% calc(2em + 3ex) auto");
     25 
     26 test_valid_value("margin-top", "10px");
     27 test_valid_value("margin-right", "20%");
     28 test_valid_value("margin-bottom", "calc(2em + 3ex)");
     29 test_valid_value("margin-left", "auto");
     30 test_valid_value("margin-top", "-10px");
     31 test_valid_value("margin-right", "-20%");
     32 </script>
     33 </body>
     34 </html>