flexbox-baseline-multi-line-vert-002-ref.html (1682B)
1 <!DOCTYPE html> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <!-- Reference case, using inline-block instead of inline-flex, and with the 7 baseline-aligned items aligned using specific font-size / line-heights, 8 and with unaligned children taken out of baseline-alignment using 9 "float: left". 10 --> 11 <html> 12 <head> 13 <title>CSS Reftest Reference</title> 14 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 15 <meta charset="utf-8"> 16 <style> 17 .flexContainer { 18 display: inline-block; 19 /* Split testcase's 40px width into 20px of padding-right and 20px of 20 width, to set aside space for the testcase's (invisible) second line. 21 */ 22 width: 20px; 23 padding-right: 20px; 24 height: 40px; 25 background: lightblue; 26 } 27 .flexContainer > * { 28 width: 20px; 29 height: 20px; 30 display: inline-block; 31 } 32 33 .smallFont { 34 font-size: 8px; 35 line-height: 8px; 36 } 37 .medFont { 38 font-size: 12px; 39 line-height: 12px; 40 } 41 .bigFont { 42 font-size: 16px; 43 line-height: 16px; 44 } 45 .unaligned { float: left } 46 </style> 47 </head> 48 <body> 49 a 50 <!-- Flex containers with flex items that have a mix of baselines: --> 51 <div class="flexContainer medFont"> 52 <div class="bigFont">d</div 53 ><br><div class="medFont unaligned">e</div> 54 </div> 55 56 <!-- Flex container with second line baseline-aligned 57 (shouldn't make a difference) --> 58 <div class="flexContainer smallFont"> 59 <div class="bigFont">l</div 60 ><br><div class="medFont unaligned">m</div> 61 </div> 62 n 63 64 </body> 65 </html>