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 | <!DOCTYPE html> |
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 | <!-- Testcase for how we compute the baseline of a vertical flex container |
michael@0 | 7 | with several flex lines. |
michael@0 | 8 | The spec says this about this case: |
michael@0 | 9 | [Given that the first line has no baseline-aligned items:] |
michael@0 | 10 | ...if the flex container has at least one flex item, and its |
michael@0 | 11 | first flex item has a baseline parallel to the flex |
michael@0 | 12 | container's main axis, the flex container's main-axis |
michael@0 | 13 | baseline is that baseline. |
michael@0 | 14 | --> |
michael@0 | 15 | <html> |
michael@0 | 16 | <head> |
michael@0 | 17 | <title>CSS Test: Testing the baseline of a vertical flex container with multiple flex lines</title> |
michael@0 | 18 | <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> |
michael@0 | 19 | <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-baselines"> |
michael@0 | 20 | <link rel="match" href="flexbox-baseline-multi-line-vert-1-ref.html"> |
michael@0 | 21 | <meta charset="utf-8"> |
michael@0 | 22 | <style> |
michael@0 | 23 | .flexContainer { |
michael@0 | 24 | display: inline-flex; |
michael@0 | 25 | flex-direction: column; |
michael@0 | 26 | flex-wrap: wrap; |
michael@0 | 27 | width: 40px; |
michael@0 | 28 | height: 40px; |
michael@0 | 29 | background: lightblue; |
michael@0 | 30 | } |
michael@0 | 31 | .flexContainer > * { |
michael@0 | 32 | height: 20px; |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | /* We'll make the second flex line not paint anything, so that the |
michael@0 | 36 | reference case doesn't need to bother matching it. */ |
michael@0 | 37 | .flexContainer > *:nth-child(3), |
michael@0 | 38 | .flexContainer > *:nth-child(4) { |
michael@0 | 39 | visibility: hidden; |
michael@0 | 40 | } |
michael@0 | 41 | |
michael@0 | 42 | .smallFont { |
michael@0 | 43 | font-size: 8px; |
michael@0 | 44 | line-height: 8px; |
michael@0 | 45 | } |
michael@0 | 46 | .medFont { |
michael@0 | 47 | font-size: 12px; |
michael@0 | 48 | line-height: 12px; |
michael@0 | 49 | } |
michael@0 | 50 | .bigFont { |
michael@0 | 51 | font-size: 16px; |
michael@0 | 52 | line-height: 16px; |
michael@0 | 53 | } |
michael@0 | 54 | </style> |
michael@0 | 55 | </head> |
michael@0 | 56 | <body> |
michael@0 | 57 | a |
michael@0 | 58 | <!-- Flex containers with flex items that have a mix of baselines: --> |
michael@0 | 59 | <div class="flexContainer"> |
michael@0 | 60 | <div class="medFont">b</div |
michael@0 | 61 | ><div class="bigFont">c</div |
michael@0 | 62 | ><div class="bigFont">d</div |
michael@0 | 63 | ><div class="medFont">e</div> |
michael@0 | 64 | </div> |
michael@0 | 65 | |
michael@0 | 66 | <div class="flexContainer"> |
michael@0 | 67 | <div class="bigFont">f</div |
michael@0 | 68 | ><div class="smallFont">g</div |
michael@0 | 69 | ><div class="medFont">h</div |
michael@0 | 70 | ><div class="bigFont">i</div> |
michael@0 | 71 | </div> |
michael@0 | 72 | |
michael@0 | 73 | <!-- Flex container with second line baseline-aligned |
michael@0 | 74 | (shouldn't make a difference) --> |
michael@0 | 75 | <div class="flexContainer"> |
michael@0 | 76 | <div class="smallFont">j</div |
michael@0 | 77 | ><div class="bigFont">k</div |
michael@0 | 78 | ><div class="bigFont" style="align-self: baseline">l</div |
michael@0 | 79 | ><div class="medFont" style="align-self: baseline">m</div> |
michael@0 | 80 | </div> |
michael@0 | 81 | n |
michael@0 | 82 | |
michael@0 | 83 | </body> |
michael@0 | 84 | </html> |