flexbox-writing-mode-010-ref.html (2589B)
1 <!DOCTYPE html> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html> 7 <head> 8 <title>CSS Reftest Reference</title> 9 <meta charset="utf-8"> 10 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 11 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> 12 <style> 13 .container { 14 display: block; 15 border: 2px solid purple; 16 padding: 2px; 17 margin-bottom: 2em; 18 height: 150px; 19 width: 500px; 20 } 21 22 span { 23 display: block; 24 background: lightgrey; 25 border: 2px solid black; 26 margin: 11px 13px 17px 7px; 27 inline-size: 6px; 28 } 29 30 .small { font: 12px Ahem; } 31 .big { font: 20px Ahem; } 32 33 .hl { writing-mode: horizontal-tb; direction: ltr; } 34 .hr { writing-mode: horizontal-tb; direction: rtl; } 35 .vl { writing-mode: vertical-lr; direction: ltr; } 36 .vr { writing-mode: vertical-rl; direction: ltr; } 37 .vl_rtl { writing-mode: vertical-lr; direction: rtl; } 38 .vr_rtl { writing-mode: vertical-rl; direction: rtl; } 39 40 .container > .hl, .container > .hr { 41 /* In the testcase, these items are stretched vertically 42 via the default "align-self:stretch" behavior, and because 43 they have a height of "auto". 44 (The rest of the items have a non-auto height from "inline-size" 45 and their vertical writing-mode, so those ones do not stretch.) */ 46 height: 118px; 47 } 48 49 .container.hl > * { float: left; } 50 .container.hr > * { float: right; } 51 52 </style> 53 </head> 54 <body> 55 56 <div class="container hl"> 57 <span class="hl small">p b c</span> 58 <span class="hl big">p e</span> 59 <span class="hr small">p b c</span> 60 <span class="hr big">p e</span> 61 <span class="vl small">p b c</span> 62 <span class="vl big">p e</span> 63 </div> 64 <div class="container hl"> 65 <span class="vr small">p b c</span> 66 <span class="vr big">p e</span> 67 <span class="vl_rtl small">p b c</span> 68 <span class="vl_rtl big">p e</span> 69 <span class="vr_rtl small">p b c</span> 70 <span class="vr_rtl big">p e</span> 71 </div> 72 <div class="container hr"> 73 <span class="hl small">p b c</span> 74 <span class="hl big">p e</span> 75 <span class="hr small">p b c</span> 76 <span class="hr big">p e</span> 77 <span class="vl small">p b c</span> 78 <span class="vl big">p e</span> 79 </div> 80 <div class="container hr"> 81 <span class="vr small">p b c</span> 82 <span class="vr big">p e</span> 83 <span class="vl_rtl small">p b c</span> 84 <span class="vl_rtl big">p e</span> 85 <span class="vr_rtl small">p b c</span> 86 <span class="vr_rtl big">p e</span> 87 </div> 88 89 </body> 90 </html>