Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
michael@0 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
michael@0 | 2 | <!-- |
michael@0 | 3 | Any copyright is dedicated to the Public Domain. |
michael@0 | 4 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 5 | --> |
michael@0 | 6 | <!-- Reference case for align-items / align-self behavior, using floated divs |
michael@0 | 7 | in place of flex items and using relative positioning in place of the |
michael@0 | 8 | align-items / align-self properties. --> |
michael@0 | 9 | <html xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 10 | <head> |
michael@0 | 11 | <title>CSS Reftest Reference</title> |
michael@0 | 12 | <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/> |
michael@0 | 13 | <style> |
michael@0 | 14 | .flexbox { |
michael@0 | 15 | border: 1px dashed blue; |
michael@0 | 16 | padding: 3px; |
michael@0 | 17 | width: 560px; |
michael@0 | 18 | height: 4px; |
michael@0 | 19 | font-size: 10px; |
michael@0 | 20 | line-height: 10px; |
michael@0 | 21 | font-family: sans-serif; |
michael@0 | 22 | } |
michael@0 | 23 | |
michael@0 | 24 | .flexbox > div { |
michael@0 | 25 | width: 40px; |
michael@0 | 26 | float: left; |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | .big { |
michael@0 | 30 | height: 100px; |
michael@0 | 31 | font-size: 20px; |
michael@0 | 32 | line-height: 20px; |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | /* Classes for each of the various align-self values */ |
michael@0 | 36 | .flex-start { |
michael@0 | 37 | background: lime; |
michael@0 | 38 | } |
michael@0 | 39 | .flex-end { |
michael@0 | 40 | background: orange; |
michael@0 | 41 | } |
michael@0 | 42 | .center { |
michael@0 | 43 | background: lightblue; |
michael@0 | 44 | } |
michael@0 | 45 | .baseline { |
michael@0 | 46 | background: teal; |
michael@0 | 47 | } |
michael@0 | 48 | .stretch { |
michael@0 | 49 | background: pink; |
michael@0 | 50 | } |
michael@0 | 51 | .auto { |
michael@0 | 52 | background: yellow; |
michael@0 | 53 | } |
michael@0 | 54 | .unspecified { |
michael@0 | 55 | background: lightgreen; |
michael@0 | 56 | } |
michael@0 | 57 | .initial { |
michael@0 | 58 | background: aqua; |
michael@0 | 59 | } |
michael@0 | 60 | .inherit { |
michael@0 | 61 | background: violet; |
michael@0 | 62 | } |
michael@0 | 63 | </style> |
michael@0 | 64 | </head> |
michael@0 | 65 | <body> |
michael@0 | 66 | <div class="flexbox"> |
michael@0 | 67 | <div class="flex-start">start</div> |
michael@0 | 68 | <div class="flex-start big">a b c d e f</div> |
michael@0 | 69 | <div class="flex-end" style="position: relative; top: -6px">end</div> |
michael@0 | 70 | <div class="flex-end big" style="position: relative; top: -96px">a b c d e f</div> |
michael@0 | 71 | <div class="center" style="position: relative; top: -3px">center</div> |
michael@0 | 72 | <div class="center big" style="position: relative; top: -48px">a b c d e f</div> |
michael@0 | 73 | <!-- We use inline-blocks inside of a wrapper-block as references for the |
michael@0 | 74 | baseline-aligned flex items, since inline-blocks get |
michael@0 | 75 | baseline-aligned in block layout. We also need to specify the widths |
michael@0 | 76 | manually here since the "flexbox > div" child-selector doesn't |
michael@0 | 77 | handle these guys (since they're grandchildren). |
michael@0 | 78 | --> |
michael@0 | 79 | <div style="width: 80px"> |
michael@0 | 80 | <div class="baseline" |
michael@0 | 81 | style="width: 40px; display: inline-block">base</div |
michael@0 | 82 | ><div class="baseline big" |
michael@0 | 83 | style="width: 40px; display: inline-block">abc</div> |
michael@0 | 84 | </div> |
michael@0 | 85 | <div class="stretch" style="height: 100%">stretch</div> |
michael@0 | 86 | <div class="stretch big">a b c d e f</div> |
michael@0 | 87 | <div class="auto" style="height: 100%">auto</div> |
michael@0 | 88 | <div class="unspecified" style="height: 100%">unspec</div> |
michael@0 | 89 | <div class="initial" style="height: 100%">initial</div> |
michael@0 | 90 | <div class="inherit" style="height: 100%">inherit</div> |
michael@0 | 91 | </div> |
michael@0 | 92 | </body> |
michael@0 | 93 | </html> |