flexbox-align-self-vert-rtl-003.xhtml (2181B)
1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <!-- Testcase for align-items / align-self behavior, with all the possible 7 values included on different items within a flex container, and with the 8 flex container being skinnier than its items, and with "direction: rtl" to 9 swap the horizontal (cross) axis. --> 10 <html xmlns="http://www.w3.org/1999/xhtml"> 11 <head> 12 <title>CSS Test: Testing the behavior of 'align-self' with a vertical flex container that's skinnier than its items and with 'direction: rtl'</title> 13 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 14 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-items-property"/> 15 <link rel="match" href="flexbox-align-self-vert-rtl-003-ref.xhtml"/> 16 <style> 17 .flexbox { 18 border: 1px dashed blue; 19 width: 4px; 20 display: flex; 21 flex-direction: column; 22 direction: rtl; 23 font-family: sans-serif; 24 font-size: 10px; 25 margin-left: 80px; 26 } 27 28 div.big { 29 font-size: 18px; 30 width: 50px; 31 } 32 33 /* Classes for each of the various align-self values */ 34 .flex-start { 35 background: lime; 36 align-self: flex-start; 37 } 38 .flex-end { 39 background: orange; 40 align-self: flex-end; 41 } 42 .center { 43 background: lightblue; 44 align-self: center; 45 } 46 .baseline { 47 background: teal; 48 align-self: baseline; 49 } 50 .stretch { 51 background: pink; 52 align-self: stretch; 53 } 54 </style> 55 </head> 56 <body> 57 <div class="flexbox"> 58 <div class="flex-start">start</div> 59 <div class="flex-start big">a b</div> 60 <div class="flex-end">end</div> 61 <div class="flex-end big">a b</div> 62 <div class="center">center</div> 63 <div class="center big">a b</div> 64 <div class="baseline">base</div> 65 <div class="baseline big">abc</div> 66 <div class="stretch">stretch</div> 67 <div class="stretch big">a b</div> 68 </div> 69 </body> 70 </html>