tor-browser

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

border-spacing-computed.html (1167B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Table Module: getComputedStyle().borderSpacing</title>
      6 <link rel="help" href="https://drafts.csswg.org/css-tables/#propdef-border-spacing">
      7 <meta name="assert" content="border-spacing computed value is two absolute lengths.">
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="/css/support/computed-testcommon.js"></script>
     11 </head>
     12 <body>
     13 <div id="target"></div>
     14 <style>
     15  #target {
     16    font-size: 40px;
     17  }
     18 </style>
     19 <script>
     20 test_computed_value("border-spacing", "10px 20px");
     21 
     22 // This should be "0px" and not "0px 0px" due to the shortest serialization principle:
     23 // https://drafts.csswg.org/cssom/#serializing-css-values
     24 // > If component values can be omitted or replaced with a shorter
     25 // > representation without changing the meaning of the value, omit/replace them.
     26 test_computed_value("border-spacing", "0", "0px");
     27 
     28 test_computed_value("border-spacing", "calc(10px + 0.5em) calc(10px - 0.5em)", "30px 0px");
     29 test_computed_value("border-spacing", "calc(10px - 0.5em) calc(10px + 0.5em)", "0px 30px");
     30 </script>
     31 </body>
     32 </html>