tor-browser

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

scroll-margin-computed.html (1259B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <meta charset="utf-8">
      5 <title>CSS Scroll Snap: getComputedStyle().scrollMargin</title>
      6 <link rel="help" href="https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin">
      7 <meta name="assert" content="scroll-margin computed value is absolute length.">
      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-margin-top", "10px");
     21 test_computed_value("scroll-margin-top", "calc(10px - 0.5em)", "-10px");
     22 
     23 
     24 test_computed_value("scroll-margin-right", "10px");
     25 test_computed_value("scroll-margin-right", "calc(10px - 0.5em)", "-10px");
     26 
     27 
     28 test_computed_value("scroll-margin-bottom", "10px");
     29 test_computed_value("scroll-margin-bottom", "calc(10px - 0.5em)", "-10px");
     30 
     31 
     32 test_computed_value("scroll-margin-left", "10px");
     33 test_computed_value("scroll-margin-left", "calc(10px - 0.5em)", "-10px");
     34 
     35 
     36 test_computed_value("scroll-margin", "10px");
     37 test_computed_value("scroll-margin", "calc(10px - 0.5em)", "-10px");
     38 
     39 test_computed_value("scroll-margin", "1px 2px");
     40 </script>
     41 </body>
     42 </html>