tor-browser

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

legend-sans-fieldset-display-ruby.html (1037B)


      1 <!doctype html>
      2 <title>legend sans fieldset and CSS display (ruby)</title>
      3 <script src=/resources/testharness.js></script>
      4 <script src=/resources/testharnessreport.js></script>
      5 <style>
      6 * { margin: 0; padding: 0; }
      7 .ruby { display: ruby; }
      8 .rt { display: ruby-text; }
      9 rt { font-size: inherit; }
     10 </style>
     11 <p><legend class=ruby>ruby<legend class=rt>rt</legend></legend> <ruby>ruby<rt>rt</ruby>
     12 <script>
     13  function test_display(testSelector, refSelector) {
     14    test(() => {
     15      const testElm = document.querySelector(testSelector);
     16      const refElm = document.querySelector(refSelector);
     17      const testStyle = getComputedStyle(testElm);
     18      const refStyle = getComputedStyle(refElm);
     19      assert_equals(testStyle.display, refStyle.display, testSelector + ' display');
     20      assert_equals(testStyle.width, refStyle.width, testSelector + ' width');
     21      assert_equals(testStyle.height, refStyle.height, testSelector + ' height');
     22    }, testSelector);
     23  }
     24 
     25  test_display('.ruby', 'ruby');
     26  test_display('.rt', 'rt');
     27 </script>