layout/reftests/w3c-css/submitted/flexbox/flexbox-align-self-horiz-3-ref.xhtml

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

mercurial