tor-browser

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

background-position-y-computed.html (1728B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Backgrounds and Borders Module Level 4: getComputedStyle().backgroundPositionY</title>
      6 <link rel="help" href="https://drafts.csswg.org/css-backgrounds-4/#propdef-background-position-y">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <script src="/css/support/computed-testcommon.js"></script>
     10 <style>
     11  #target {
     12    font-size: 40px;
     13  }
     14 </style>
     15 </head>
     16 <body>
     17 <div id="target"></div>
     18 <script>
     19 test_computed_value("background-position-y", "center", "50%");
     20 test_computed_value("background-position-y", "top", "0%");
     21 test_computed_value("background-position-y", "bottom", "100%");
     22 test_computed_value("background-position-y", "y-start");
     23 test_computed_value("background-position-y", "y-end");
     24 test_computed_value("background-position-y", "-20%");
     25 test_computed_value("background-position-y", "10px");
     26 test_computed_value("background-position-y", "0.5em", "20px");
     27 test_computed_value("background-position-y", "calc(10px - 0.5em)", "-10px");
     28 test_computed_value("background-position-y", "top -20%", "-20%");
     29 test_computed_value("background-position-y", "bottom -10px", "calc(100% + 10px)");
     30 test_computed_value("background-position-y", "-20%, 10px", "-20%");
     31 test_computed_value("background-position-y", "center, top, bottom", "50%");
     32 test_computed_value("background-position-y", "0.5em, y-start, y-end", "20px");
     33 
     34 // See background-computed.html for a test with multiple background images.
     35 test_computed_value("background-position-y", "calc(10px - 0.5em), -20%, 10px", "-10px");
     36 test_computed_value("background-position-y", "calc(10px - 0.5em), top -20%, bottom 10px", "-10px");
     37 </script>
     38 </body>
     39 </html>