Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 blocks in |
michael@0 | 7 | place of flex items and using float and width keywords to emulate 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 | width: 4px; |
michael@0 | 17 | float: left; |
michael@0 | 18 | font-family: sans-serif; |
michael@0 | 19 | font-size: 10px; |
michael@0 | 20 | margin-left: 80px; |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | .flex-start, .flex-end, .center, .baseline, .stretch { |
michael@0 | 24 | clear: both; |
michael@0 | 25 | margin: 1px 2px 3px 4px; |
michael@0 | 26 | border-width: 2px 3px 4px 5px; |
michael@0 | 27 | padding: 3px 4px 5px 6px; |
michael@0 | 28 | border-style: dotted; |
michael@0 | 29 | } |
michael@0 | 30 | |
michael@0 | 31 | div.big { |
michael@0 | 32 | font-size: 18px; |
michael@0 | 33 | width: 50px; |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | /* Classes for each of the various align-self values */ |
michael@0 | 37 | .flex-start { |
michael@0 | 38 | background: lime; |
michael@0 | 39 | float: left; |
michael@0 | 40 | } |
michael@0 | 41 | .flex-end { |
michael@0 | 42 | background: orange; |
michael@0 | 43 | float: right; |
michael@0 | 44 | } |
michael@0 | 45 | <!-- We center shrinkwrapped text by putting it into an inline-block, and |
michael@0 | 46 | then wrapping that inline-block in a helper-div that has |
michael@0 | 47 | "text-align:center" set. For this to work, the parent has to be at |
michael@0 | 48 | least as wide as the centered content inside of it, so we make it |
michael@0 | 49 | large with a negative margin such that its center aligns with the |
michael@0 | 50 | 4px-wide container's center. --> |
michael@0 | 51 | .centerParent { |
michael@0 | 52 | text-align: center; |
michael@0 | 53 | width: 100px; |
michael@0 | 54 | margin-left: -48px; |
michael@0 | 55 | } |
michael@0 | 56 | .center { |
michael@0 | 57 | background: lightblue; |
michael@0 | 58 | display: inline-block; |
michael@0 | 59 | text-align: left; /* Keep parent's centering from tweaking my text */ |
michael@0 | 60 | } |
michael@0 | 61 | .baseline { |
michael@0 | 62 | background: teal; |
michael@0 | 63 | float: left; |
michael@0 | 64 | } |
michael@0 | 65 | .stretch { |
michael@0 | 66 | background: pink; |
michael@0 | 67 | } |
michael@0 | 68 | .clearFloats { clear: both } |
michael@0 | 69 | </style> |
michael@0 | 70 | </head> |
michael@0 | 71 | <body> |
michael@0 | 72 | <div class="flexbox"> |
michael@0 | 73 | <div class="flex-start">start</div> |
michael@0 | 74 | <div class="flex-start big">a b</div> |
michael@0 | 75 | <div class="flex-end">end</div> |
michael@0 | 76 | <div class="flex-end big">a b</div> |
michael@0 | 77 | <div class="centerParent"> |
michael@0 | 78 | <div class="center">center</div> |
michael@0 | 79 | </div> |
michael@0 | 80 | <div class="centerParent"> |
michael@0 | 81 | <div class="center big">a b</div> |
michael@0 | 82 | </div> |
michael@0 | 83 | </div> |
michael@0 | 84 | <div class="flexbox"> |
michael@0 | 85 | <div class="baseline">base</div> |
michael@0 | 86 | <div class="baseline big">abc</div> |
michael@0 | 87 | <div class="clearFloats"></div> |
michael@0 | 88 | <div class="stretch">stretch</div> |
michael@0 | 89 | <!-- Force a 3px + 1px = 4px margin between this and the previous div |
michael@0 | 90 | (to thwart the effects of margin-collapsing). This is the only |
michael@0 | 91 | place we need this hack, because everywhere else in this test |
michael@0 | 92 | we use floats or inline-blocks, whose margins don't collapse. --> |
michael@0 | 93 | <div class="stretch big" style="margin-top: 4px">a b</div> |
michael@0 | 94 | </div> |
michael@0 | 95 | </body> |
michael@0 | 96 | </html> |