tor-browser

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

ruby-intra-level-whitespace-002.html (1602B)


      1 <!DOCTYPE html>
      2 <meta charset="UTF-8">
      3 <title>Intra-level whitespace pairing</title>
      4 <link rel="author" title="Xidorn Quan" href="https://www.upsuper.org">
      5 <link rel="author" title="Mozilla" href="https://www.mozilla.org">
      6 <link rel="help" href="https://drafts.csswg.org/css-ruby-1/#ruby-pairing">
      7 <link rel="match" href="ruby-intra-level-whitespace-002-ref.html">
      8 <link rel="stylesheet" href="support/ruby-common.css">
      9 <style>
     10  body { font-family: monospace; }
     11  .container { border: 1px solid blue; margin: 20px; }
     12 </style>
     13 <style id="style"></style>
     14 <span id="ref1">12345</span> <span id="ref2">12345 67890</span>
     15 <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt><rt>54321</rt></ruby></div>
     16 <div class="container"><ruby><rb>12345</rb><rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div>
     17 <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div>
     18 <script type="text/javascript">
     19  var ref1 = document.getElementById('ref1');
     20  var ref2 = document.getElementById('ref2');
     21  var style = document.getElementById('style');
     22  var width1 = ref1.getBoundingClientRect().width + 'px';
     23  var width2 = ref2.getBoundingClientRect().width + 'px';
     24  // It changes the width of the containers to test incremental
     25  // layout with intra-level whitespace columns being pushed and
     26  // pulled up across a line-break.
     27  style.textContent = '.container { width: ' + width1 + '; }';
     28  document.body.offsetHeight;  // force reflow
     29  style.textContent = '.container { width: ' + width2 + '; }';
     30  document.body.offsetHeight;  // force reflow
     31 </script>