|
1 <!DOCTYPE html> |
|
2 <!-- |
|
3 Any copyright is dedicated to the Public Domain. |
|
4 http://creativecommons.org/publicdomain/zero/1.0/ |
|
5 --> |
|
6 <!-- In this reference case, we get each container to be sized the same as |
|
7 in the testcase, without any visible baseline alignemnt, by using some |
|
8 hidden flex items. |
|
9 --> |
|
10 <html> |
|
11 <head> |
|
12 <title>CSS Reftest Reference</title> |
|
13 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> |
|
14 <meta charset="utf-8"> |
|
15 <style> |
|
16 .flexContainer { |
|
17 display: flex; |
|
18 width: 50px; |
|
19 background: yellow; |
|
20 border: 1px dotted black; |
|
21 margin: 5px; |
|
22 align-items: flex-start; |
|
23 } |
|
24 .hiddenItemForSizing { |
|
25 width: 0; |
|
26 color: transparent; |
|
27 align-self: baseline; |
|
28 } |
|
29 .largeFont { |
|
30 font-size: 20px; |
|
31 background: lightblue; |
|
32 /* Our flex items get padding on opposite sides (top/bottom) so that they |
|
33 produce a large combined height when baseline-aligned: */ |
|
34 padding-top: 5px; |
|
35 } |
|
36 .smallFont { |
|
37 font-size: 10px; |
|
38 background: pink; |
|
39 /* Our flex items get padding on opposite sides (top/bottom) so that they |
|
40 produce a large combined height when baseline-aligned: */ |
|
41 padding-bottom: 20px; |
|
42 } |
|
43 </style> |
|
44 </head> |
|
45 <body> |
|
46 <div class="flexContainer"> |
|
47 <div class="largeFont">a</div> |
|
48 <!-- Hidden flex items used to determine container's cross size, |
|
49 based on their baseline-aligned combined cross size: --> |
|
50 <div class="largeFont hiddenItemForSizing">a</div> |
|
51 <div class="smallFont hiddenItemForSizing">b</div> |
|
52 </div> |
|
53 |
|
54 <div class="flexContainer"> |
|
55 <div class="smallFont">b</div> |
|
56 <!-- Hidden flex items used to determine container's cross size, |
|
57 based on their baseline-aligned combined cross size: --> |
|
58 <div class="largeFont hiddenItemForSizing">a</div> |
|
59 <div class="smallFont hiddenItemForSizing">b</div> |
|
60 </div> |
|
61 </body> |
|
62 </html> |