|
1 <!DOCTYPE html> |
|
2 <!-- |
|
3 Any copyright is dedicated to the Public Domain. |
|
4 http://creativecommons.org/publicdomain/zero/1.0/ |
|
5 --> |
|
6 <html> |
|
7 <head> |
|
8 <title>CSS Reftest Reference</title> |
|
9 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> |
|
10 <meta charset="utf-8"> |
|
11 <style> |
|
12 div.flexbox { |
|
13 border: 1px dashed black; |
|
14 width: 100px; |
|
15 height: 12px; |
|
16 margin-bottom: 2px; |
|
17 } |
|
18 div.halfMainSize { |
|
19 width: 48px; |
|
20 border: 1px solid blue; |
|
21 background: lightblue; |
|
22 } |
|
23 div.hugeMainSize { |
|
24 width: 148px; |
|
25 border: 1px solid purple; |
|
26 background: fuchsia; |
|
27 } |
|
28 div.fullCrossSize { |
|
29 height: 10px; |
|
30 } |
|
31 div.halfCrossSize { |
|
32 height: 4px; |
|
33 } |
|
34 </style> |
|
35 </head> |
|
36 <body> |
|
37 |
|
38 <!-- Single small flex item --> |
|
39 <div class="flexbox"> |
|
40 <div class="halfMainSize fullCrossSize"></div> |
|
41 </div> |
|
42 |
|
43 <!-- Single small flex item with 'margin-left' set to push it to protrude |
|
44 from the far edge of the container (and to shrink as a result) --> |
|
45 <div class="flexbox"> |
|
46 <div class="halfMainSize fullCrossSize" |
|
47 style="margin-left: 80px; width: 18px"></div> |
|
48 </div> |
|
49 |
|
50 <!-- Single small inflexible flex item with 'margin-left' set to push it to |
|
51 protrude from the far edge of the container --> |
|
52 <div class="flexbox"> |
|
53 <div class="halfMainSize fullCrossSize" |
|
54 style="margin-left: 80px"></div> |
|
55 </div> |
|
56 |
|
57 <!-- Two flex items, exactly large enough to fit in line (no wrapping): --> |
|
58 <div class="flexbox"> |
|
59 <div class="halfMainSize fullCrossSize" style="float: left"></div> |
|
60 <div class="halfMainSize fullCrossSize" style="float: left"></div> |
|
61 </div> |
|
62 |
|
63 <!-- and now with some margin on first item, to force second item to wrap: --> |
|
64 <div class="flexbox"> |
|
65 <div class="halfMainSize halfCrossSize"></div> |
|
66 <div class="halfMainSize halfCrossSize"></div> |
|
67 </div> |
|
68 |
|
69 <!-- and now with some margin on second item, again forcing it to wrap: --> |
|
70 <div class="flexbox"> |
|
71 <div class="halfMainSize halfCrossSize"></div> |
|
72 <div class="halfMainSize halfCrossSize"></div> |
|
73 </div> |
|
74 |
|
75 <!-- Single large flex item: overflows (but does not wrap) and is shrunk |
|
76 to fit container's main-size --> |
|
77 <div class="flexbox"> |
|
78 <div class="hugeMainSize fullCrossSize" style="width: 98px"></div> |
|
79 </div> |
|
80 |
|
81 <!-- Single large flex item: overflows (but does not wrap) --> |
|
82 <div class="flexbox"> |
|
83 <div class="hugeMainSize fullCrossSize"></div> |
|
84 </div> |
|
85 |
|
86 <!-- Small flex item, followed by large flex item (which wraps to |
|
87 its own line and then shrink to container's main-size) --> |
|
88 <div class="flexbox"> |
|
89 <div class="halfMainSize halfCrossSize"></div> |
|
90 <div class="hugeMainSize halfCrossSize" style="width: 98px"></div> |
|
91 </div> |
|
92 |
|
93 <!-- Small flex item, followed by large inflexible flex item (which wraps to |
|
94 its own line and then shrink to container's main-size) --> |
|
95 <div class="flexbox"> |
|
96 <div class="halfMainSize halfCrossSize"></div> |
|
97 <div class="hugeMainSize halfCrossSize"></div> |
|
98 </div> |
|
99 |
|
100 </body> |
|
101 </html> |