tor-browser

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

mask-size-computed.html (1697B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Masking Module Level 1: getComputedStyle().maskSize</title>
      6 <link rel="author" title="Sam Weinig" href="mailto:sam@webkit.org">
      7 <link rel="help" href="https://drafts.fxtf.org/css-masking-1/#the-mask-size">
      8 <meta name="assert" content="mask-size computed value is a list, each item a pair of sizes (one per axis) each represented as either a keyword or a computed length-percentage value.">
      9 <script src="/resources/testharness.js"></script>
     10 <script src="/resources/testharnessreport.js"></script>
     11 <script src="/css/support/computed-testcommon.js"></script>
     12 <style>
     13  #target {
     14    font-size: 40px;
     15  }
     16 </style>
     17 </head>
     18 <body>
     19 <div id="target"></div>
     20 <script>
     21 test_computed_value("mask-size", "1px", "1px auto");
     22 test_computed_value("mask-size", "1px auto", "1px auto");
     23 test_computed_value("mask-size", "2% 3%");
     24 test_computed_value("mask-size", "auto");
     25 test_computed_value("mask-size", "auto auto", "auto");
     26 test_computed_value("mask-size", "auto 4%");
     27 test_computed_value("mask-size", "contain");
     28 test_computed_value("mask-size", "cover");
     29 test_computed_value("mask-size", "calc(10px + 0.5em) calc(10px - 0.5em)", "30px 0px");
     30 test_computed_value("mask-size", "calc(10px - 0.5em) calc(10px + 0.5em)", "0px 30px");
     31 test_computed_value("mask-size", "auto 1px, 2% 3%, contain", "auto 1px");
     32 
     33 document.getElementById("target").style['mask-image'] = "none, none";
     34 test_computed_value("mask-size", "auto", "auto, auto", "multiple values");
     35 test_computed_value("mask-size", "auto, 100%", "auto, 100% auto", "multiple values");
     36 test_computed_value("mask-size", "100%", "100% auto, 100% auto", "multiple values");
     37 </script>
     38 </body>
     39 </html>