box-properties-2-ref.html (1133B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Bug 1055667 - Box properties on ruby boxes</title> 6 <link rel="stylesheet" href="common.css"> 7 <script type="text/javascript" src="utils.js"></script> 8 </head> 9 <body style="line-height: 10"> 10 <ruby> 11 <rb>base1</rb> 12 <rb><div></div></rb> 13 <rb>base3</rb> 14 <rtc> 15 <rt></rt> 16 <rt style="margin: 22px 0;"><div id="rtblock" style="width: 256px; text-align:center; background: silver; padding: 2px; border: 4px solid gray; outline: 8px solid black; margin: 16px;"><span id="inline">text1</span></div></rt> 17 <!-- margin: 22px = margin: 16px + padding: 2px + border: 4px --> 18 <!-- width: 256px = 300px - 2 * (padding: 2px + border: 4px + margin: 16px) --> 19 </rtc> 20 </ruby> 21 <script type="text/javascript"> 22 // normal height of an one-line inline-block is the line-height, 23 // we need to adjust it to the height of the inline box to simulate 24 // the ruby text box. 25 makeBSizeMatchInlineBox(document.getElementById('rtblock'), 26 document.getElementById('inline')); 27 </script> 28 </body> 29 </html>