flexbox-align-self-vert-001.xhtml (2743B)
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. --> 8 <html xmlns="http://www.w3.org/1999/xhtml"> 9 <head> 10 <title>CSS Test: Testing the behavior of 'align-self' property values on flex items that are blocks, in a vertical flex container</title> 11 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> 12 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#align-items-property"/> 13 <link rel="match" href="flexbox-align-self-vert-001-ref.xhtml"/> 14 <style> 15 .flexbox { 16 border: 1px solid blue; 17 width: 200px; 18 display: flex; 19 flex-direction: column; 20 font-size: 10px; 21 22 /* Any children whose align-self is 'auto' (or unspecified, or 23 initial) will end up taking this value from us: */ 24 align-items: center; 25 26 /* Any children whose align-self is 'inherit' will end up 27 inheriting this value from us: */ 28 align-self: flex-end; 29 } 30 31 .big { 32 font-size: 20px; 33 width: 50px; 34 } 35 36 /* Classes for each of the various align-self values */ 37 .flex-start { 38 background: lime; 39 align-self: flex-start; 40 } 41 .flex-end { 42 background: orange; 43 align-self: flex-end; 44 } 45 .center { 46 background: lightblue; 47 align-self: center; 48 } 49 .baseline { 50 background: teal; 51 align-self: baseline; 52 } 53 .stretch { 54 background: pink; 55 align-self: stretch; 56 } 57 .auto { 58 background: yellow; 59 align-self: auto; 60 } 61 .unspecified { 62 background: lightgreen; 63 } 64 .initial { 65 background: aqua; 66 align-self: initial; 67 } 68 .inherit { 69 background: violet; 70 align-self: inherit; 71 } 72 </style> 73 </head> 74 <body> 75 <div class="flexbox"> 76 <div class="flex-start">start</div> 77 <div class="flex-start big">a b c d e f</div> 78 <div class="flex-end">end</div> 79 <div class="flex-end big">a b c d e f</div> 80 <div class="center">center</div> 81 <div class="center big">a b c d e f</div> 82 <div class="baseline">base</div> 83 <div class="baseline big">abc</div> 84 <div class="stretch">stretch</div> 85 <div class="stretch big">a b c d e f</div> 86 <div class="auto">auto</div> 87 <div class="unspecified">unspec</div> 88 <div class="initial">initial</div> 89 <div class="inherit">inherit</div> 90 </div> 91 </body> 92 </html>