flexbox-align-self-vert-003.xhtml (2129B)
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. --> 9 <html xmlns="http://www.w3.org/1999/xhtml"> 10 <head> 11 <title>CSS Test: Testing the behavior of 'align-self' with a vertical flex container that's skinnier than its items</title> 12 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 13 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-items-property"/> 14 <link rel="match" href="flexbox-align-self-vert-003-ref.xhtml"/> 15 <meta name="fuzzy" content="maxDifference=0-58;totalPixels=0-33"/> 16 <style> 17 .flexbox { 18 border: 1px dashed blue; 19 width: 4px; 20 display: flex; 21 flex-direction: column; 22 font-family: sans-serif; 23 font-size: 10px; 24 margin-left: 80px; 25 } 26 27 div.big { 28 font-size: 18px; 29 width: 50px; 30 } 31 32 /* Classes for each of the various align-self values */ 33 .flex-start { 34 background: lime; 35 align-self: flex-start; 36 } 37 .flex-end { 38 background: orange; 39 align-self: flex-end; 40 } 41 .center { 42 background: lightblue; 43 align-self: center; 44 } 45 .baseline { 46 background: teal; 47 align-self: baseline; 48 } 49 .stretch { 50 background: pink; 51 align-self: stretch; 52 } 53 </style> 54 </head> 55 <body> 56 <div class="flexbox"> 57 <div class="flex-start">start</div> 58 <div class="flex-start big">a b</div> 59 <div class="flex-end">end</div> 60 <div class="flex-end big">a b</div> 61 <div class="center">center</div> 62 <div class="center big">a b</div> 63 <div class="baseline">base</div> 64 <div class="baseline big">abc</div> 65 <div class="stretch">stretch</div> 66 <div class="stretch big">a b</div> 67 </div> 68 </body> 69 </html>