tor-browser

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

overscroll-behavior-logical.html (1824B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Test flow-relative versions of overscroll-behavior properties</title>
      4 <link rel="author" title="Majid Valipour">
      5 <link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior-1/#overscroll-behavior-longhands-logical">
      6 <link rel="help" href="https://drafts.csswg.org/css-logical/#box">
      7 <script src="/resources/testharness.js"></script>
      8 <script src="/resources/testharnessreport.js"></script>
      9 <style>
     10 div {
     11  overscroll-behavior-block: contain;
     12  overscroll-behavior-inline: none;
     13 }
     14 #horizontal {
     15  writing-mode: horizontal-tb;
     16 }
     17 #vertical {
     18  writing-mode: vertical-rl;
     19 }
     20 #horizontalreversed {
     21  writing-mode: horizontal-tb;
     22  direction: rtl;
     23 }
     24 </style>
     25 <body>
     26  <div id="horizontal"></div>
     27  <div id="vertical"></div>
     28  <div id="horizontalreversed"></div>
     29 </body>
     30 
     31 <script>
     32 test(function() {
     33  var element = document.getElementById("horizontal");
     34  assert_equals(getComputedStyle(element).overscrollBehaviorX, "none");
     35  assert_equals(getComputedStyle(element).overscrollBehaviorY, "contain");
     36 }, "Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode");
     37 
     38 test(function() {
     39  var element = document.getElementById("vertical");
     40  assert_equals(getComputedStyle(element).overscrollBehaviorX, "contain");
     41  assert_equals(getComputedStyle(element).overscrollBehaviorY, "none");
     42 }, "Logical overscroll-behavior maps correctly when element has vertical-rl writing mode");
     43 
     44 test(function() {
     45  var element = document.getElementById("horizontalreversed");
     46  assert_equals(getComputedStyle(element).overscrollBehaviorX, "none");
     47  assert_equals(getComputedStyle(element).overscrollBehaviorY, "contain");
     48 }, "Logical overscroll-behavior maps correctly when element has horizontal-tb writing mode and is not affected by rtl direction");
     49 </script>