OLD | NEW |
(Empty) | |
| 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 c
ontainer 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-prope
rty"/> |
| 14 <link rel="match" href="flexbox-align-self-vert-003-ref.xhtml"/> |
| 15 <style> |
| 16 .flexbox { |
| 17 border: 1px dashed blue; |
| 18 width: 4px; |
| 19 display: flex; |
| 20 flex-direction: column; |
| 21 font-family: sans-serif; |
| 22 font-size: 10px; |
| 23 margin-left: 80px; |
| 24 } |
| 25 |
| 26 div.big { |
| 27 font-size: 18px; |
| 28 width: 50px; |
| 29 } |
| 30 |
| 31 /* Classes for each of the various align-self values */ |
| 32 .flex-start { |
| 33 background: lime; |
| 34 align-self: flex-start; |
| 35 } |
| 36 .flex-end { |
| 37 background: orange; |
| 38 align-self: flex-end; |
| 39 } |
| 40 .center { |
| 41 background: lightblue; |
| 42 align-self: center; |
| 43 } |
| 44 .baseline { |
| 45 background: teal; |
| 46 align-self: baseline; |
| 47 } |
| 48 .stretch { |
| 49 background: pink; |
| 50 align-self: stretch; |
| 51 } |
| 52 </style> |
| 53 </head> |
| 54 <body> |
| 55 <div class="flexbox"> |
| 56 <div class="flex-start">start</div> |
| 57 <div class="flex-start big">a b</div> |
| 58 <div class="flex-end">end</div> |
| 59 <div class="flex-end big">a b</div> |
| 60 <div class="center">center</div> |
| 61 <div class="center big">a b</div> |
| 62 <div class="baseline">base</div> |
| 63 <div class="baseline big">abc</div> |
| 64 <div class="stretch">stretch</div> |
| 65 <div class="stretch big">a b</div> |
| 66 </div> |
| 67 </body> |
| 68 </html> |
OLD | NEW |