tor-browser

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

word-spacing-inherited-computed.html (1230B)


      1 <!DOCTYPE html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <link rel="author" title="Vitor Roriz" href="https://github.com/vitorroriz">
      5 <!-- Based on css/css-viewport/zoom/word-spacing.html by Stefan Zager -->
      6 <link rel="help" href="https://drafts.csswg.org/css-viewport/">
      7 <style>
      8 .spacing {
      9  word-spacing: 2rem;
     10 }
     11 .zoom {
     12  zoom: 2;
     13 }
     14 </style>
     15 
     16 <div class="spacing">
     17  <div id="inherited-word-spacing">unzoomed lorem ipsum</div>
     18 </div>
     19 
     20 <div class="zoom">
     21  <div id="zoomed-word-spacing" class="spacing">zoomed lorem ipsum</div>
     22 </div>
     23 
     24 <div class="spacing">
     25  <div id="zoomed-inherited-word-spacing" class="zoom">zoomed inherited lorem ipsum</div>
     26 </div>
     27 
     28 <script>
     29 test(() => {
     30    assert_equals(getComputedStyle(document.getElementById("inherited-word-spacing")).wordSpacing, '32px');
     31 }, "computed inherited word-spacing");
     32 test(() => {
     33    assert_equals(getComputedStyle(document.getElementById("zoomed-word-spacing")).wordSpacing, '32px');
     34 }, "computed zoomed word-spacing");
     35 test(() => {
     36    assert_equals(getComputedStyle(document.getElementById("zoomed-inherited-word-spacing")).wordSpacing, '32px');
     37 }, "computed zoomed inherited word-spacing");
     38 </script>