tor-browser

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

scroll-padding-computed.html (3020B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Scroll Snap: getComputedStyle().scrollPadding</title>
      6 <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-padding">
      7 <meta name="assert" content="scroll-padding computed value is per side, either the keyword auto or a computed <length-percentage> value.">
      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("scroll-padding-top", "auto");
     21 test_computed_value("scroll-padding-top", "0", "0px");
     22 test_computed_value("scroll-padding-top", "10px");
     23 test_computed_value("scroll-padding-top", "20%");
     24 test_computed_value("scroll-padding-top", "calc(10px + 0.5em)", "30px");
     25 test_computed_value("scroll-padding-top", "calc(10px - 0.5em)", "0px");
     26 test_computed_value("scroll-padding-top", "calc(50% + 60px)");
     27 
     28 
     29 test_computed_value("scroll-padding-right", "auto");
     30 test_computed_value("scroll-padding-right", "0", "0px");
     31 test_computed_value("scroll-padding-right", "10px");
     32 test_computed_value("scroll-padding-right", "20%");
     33 test_computed_value("scroll-padding-right", "calc(10px + 0.5em)", "30px");
     34 test_computed_value("scroll-padding-right", "calc(10px - 0.5em)", "0px");
     35 test_computed_value("scroll-padding-right", "calc(50% + 60px)");
     36 
     37 
     38 test_computed_value("scroll-padding-bottom", "auto");
     39 test_computed_value("scroll-padding-bottom", "0", "0px");
     40 test_computed_value("scroll-padding-bottom", "10px");
     41 test_computed_value("scroll-padding-bottom", "20%");
     42 test_computed_value("scroll-padding-bottom", "calc(10px + 0.5em)", "30px");
     43 test_computed_value("scroll-padding-bottom", "calc(10px - 0.5em)", "0px");
     44 test_computed_value("scroll-padding-bottom", "calc(50% + 60px)");
     45 
     46 
     47 test_computed_value("scroll-padding-left", "auto");
     48 test_computed_value("scroll-padding-left", "0", "0px");
     49 test_computed_value("scroll-padding-left", "10px");
     50 test_computed_value("scroll-padding-left", "20%");
     51 test_computed_value("scroll-padding-left", "calc(10px + 0.5em)", "30px");
     52 test_computed_value("scroll-padding-left", "calc(10px - 0.5em)", "0px");
     53 test_computed_value("scroll-padding-left", "calc(50% + 60px)");
     54 
     55 
     56 test_computed_value("scroll-padding", "auto");
     57 test_computed_value("scroll-padding", "10px");
     58 test_computed_value("scroll-padding", "0", "0px");
     59 test_computed_value("scroll-padding", "20%");
     60 test_computed_value("scroll-padding", "calc(10px + 0.5em)", "30px");
     61 test_computed_value("scroll-padding", "calc(10px - 0.5em)", "0px");
     62 
     63 test_computed_value("scroll-padding", "1px 2px");
     64 test_computed_value("scroll-padding", "1px 2px 3%");
     65 test_computed_value("scroll-padding", "1px 2px 3% 4px");
     66 test_computed_value("scroll-padding", "1px auto");
     67 test_computed_value("scroll-padding", "0 0 0 0", "0px");
     68 test_computed_value("scroll-padding", "auto auto auto auto", "auto");
     69 </script>
     70 </body>
     71 </html>