9 background-color: lightgrey;
14 background-color: grey;
21 flex-flow: column-reverse;
25 <body style=
"position: relative">
27 <!-- If any of the flex items on the flex container's first line participate
28 in baseline alignment, the flex container's main-axis baseline is the baseline
29 of those flex items. -->
32 <div class=
"inline-flexbox" style=
"height: 50px;">
33 <div style=
"align-self: flex-end">below
</div>
34 <div style=
"align-self: baseline; margin-top: 15px">baseline
</div>
35 <div style=
"align-self: flex-start">above
</div>
40 <!-- This flexbox has a baseline flexitem, but it's orthogonal so it doesn't
41 participate in baseline alignment. Instead, the baseline is the first flex
45 <div class=
"inline-flexbox" style=
"height: 40px">
46 <div style=
"align-self: flex-end">baseline
</div>
47 <div style=
"align-self: baseline; -webkit-writing-mode: vertical-rl"></div>
48 <div style=
"align-self: flex-start">above
</div>
55 <div class=
"inline-flexbox">
64 <div class=
"inline-flexbox">
71 <!-- If the first flex item has an orthogonal baseline, use the synthesized
72 baseline (bottom of the content box of the first item). -->
74 should align with the middle
75 <div class=
"inline-flexbox" style=
"width: 40px; height: 40px">
76 <div style=
"-webkit-writing-mode: vertical-rl; height: 20px; width: 40px; border-bottom: 1px solid black"></div>
81 <!-- If there are no flexitems, align to the bottom of the box. -->
83 should align with the bottom
84 <div class=
"inline-flexbox" style=
"width: 30px; height: 30px">
90 <!-- cross-axis (column) test cases. -->
93 <div class=
"inline-flexbox column">
102 <div class=
"inline-flexbox column-reverse">
109 <!-- If the first flex item has an orthogonal baseline, use the synthesized
110 baseline (bottom of the content box of the first item). -->
112 should align with the middle
113 <div class=
"inline-flexbox column" style=
"width: 40px; height: 40px;">
114 <div style=
"-webkit-writing-mode: vertical-rl; width: 40px; height: 20px; border-bottom: 1px solid black"></div>
115 <div style=
"-webkit-writing-mode: vertical-rl; width: 40px; height: 20px"></div>
120 <!-- If there are no flexitems, align to the bottom of the box. -->
122 should align with the bottom
123 <div class=
"inline-flexbox column" style=
"width: 30px; height: 30px">
128 <!-- More tests on the right side of the page. -->
129 <div style=
"position: absolute; top: 0; left: 400px; width: 360px">
131 <!-- Ignore absolutely positioned flex items. -->
134 <div class=
"inline-flexbox">
135 <div style=
"position: absolute">absolute
</div>
136 <div style=
"margin-top: 30px">baseline
</div>
141 <!-- We don't participate in baseline alignment if there's an auto margin. -->
144 <div class=
"inline-flexbox" style=
"height: 40px;">
146 <div style=
"align-self: baseline; margin-top: auto">below
</div>
153 <div style=
"display: inline-block">
154 <div class=
"inline-flexbox" style=
"height: 40px;">
156 <div style=
"align-self: baseline; margin-top: 10px">baseline
</div>
164 <!-- The spec is a little unclear what should happen here. For now, align to
165 the last line box. -->
168 <div style=
"display: inline-block">
169 <div class=
"flexbox" style=
"height: 30px;">
176 <table style=
"background-color: lightgrey; margin-top: 5px">
177 <tr style=
"height: 50px">
178 <td style=
"vertical-align: bottom">bottom
</td>
179 <td style=
"vertical-align: baseline">baseline
</td>
180 <td style=
"vertical-align: top">top
</td>
181 <td style=
"vertical-align: baseline"><div class=
"flexbox column">
185 <td style=
"vertical-align: baseline"><div class=
"flexbox column-reverse">
192 <table style=
"background-color: lightgrey; margin-top: 5px">
193 <tr style=
"height: 50px">
194 <td style=
"vertical-align: bottom">bottom
</td>
195 <td style=
"vertical-align: baseline">baseline
</td>
196 <td style=
"vertical-align: top">top
</td>
197 <td style=
"vertical-align: baseline"><div class=
"flexbox">
203 <!-- If a box contributing a baseline has a scrollbar, the box must be treated
204 as being in its initial scroll position when computing the baseline. -->
207 <div id=
"flexbox-with-scrollbar" class=
"inline-flexbox" style=
"height: 65px; width: 150px">
208 <div id=
"flexitem-with-scrollbar" style=
"align-self: baseline; padding-top: 15px; height: 50px; overflow-y: scroll;">
209 The baseline is based on
<br>
210 the non-scrolled position;
<br>
220 document
.getElementById("flexitem-with-scrollbar").scrollTop
= 999;
221 document
.getElementById("flexbox-with-scrollbar").style
.width
= "auto";