ruby-intra-level-whitespace-002-ref.html (1195B)
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="stylesheet" href="support/ruby-common.css"> 7 <style> 8 body { font-family: monospace; } 9 .container { border: 1px solid blue; margin: 20px; } 10 </style> 11 <style id="style"></style> 12 <span id="ref1">12345</span> <span id="ref2">12345 67890</span> 13 <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt><rt>54321</rt></ruby></div> 14 <div class="container"><ruby><rb>12345</rb><rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div> 15 <div class="container"><ruby><rb>12345</rb> <rb>67890</rb><rt>09876</rt> <rt>54321</rt></ruby></div> 16 <script type="text/javascript"> 17 var ref2 = document.getElementById('ref2'); 18 var style = document.getElementById('style'); 19 var width2 = ref2.getBoundingClientRect().width + 'px'; 20 // This is the same as the script in the corresponding 21 // testcase, except that here we skip the intermediate 22 // size and jump straight to the final size. 23 style.textContent = '.container { width: ' + width2 + '; }'; 24 </script>