tor-browser

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

revert-val-005.html (1300B)


      1 <!DOCTYPE html>
      2 <title>CSS Cascade: 'revert' in css-logical properties</title>
      3 <link rel="help" href="https://drafts.csswg.org/css-cascade/#default">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <style>
      7  #h1_physical {
      8    margin: 0px;
      9    margin: revert;
     10  }
     11  #h1_logical {
     12    margin: 0px;
     13    margin-inline-start: revert;
     14    margin-inline-end: revert;
     15    margin-block-start: revert;
     16    margin-block-end: revert;
     17  }
     18 </style>
     19 <h1 id=h1_physical></h1>
     20 <h1 id=h1_logical></h1>
     21 <h1 id=ref></h1>
     22 <script>
     23  test(function() {
     24    let actual = getComputedStyle(h1_physical).marginTop;
     25    let expected = getComputedStyle(ref).marginTop;
     26    // This test assumes that the UA style sheet sets a non-0px value on
     27    // <h1> elements:
     28    assert_not_equals(expected, '0px');
     29    assert_equals(actual, expected);
     30  }, 'The revert keyword works with physical properties');
     31 
     32  test(function() {
     33    let actual = getComputedStyle(h1_logical).marginTop;
     34    let expected = getComputedStyle(ref).marginTop;
     35    // This test assumes that the UA style sheet sets a non-0px value on
     36    // <h1> elements:
     37    assert_not_equals(expected, '0px');
     38    assert_equals(actual, expected);
     39  }, 'The revert keyword works with logical properties');
     40 </script>