OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <!-- |
| 3 Any copyright is dedicated to the Public Domain. |
| 4 http://creativecommons.org/publicdomain/zero/1.0/ |
| 5 --> |
| 6 <!-- Testcase for how we compute the baseline of a horizontal flex container |
| 7 with several flex items, some of which have "align-self:baseline". The |
| 8 spec says this about this case: |
| 9 If any of the flex items on the flex container's first line |
| 10 participate in baseline alignment, the flex container's |
| 11 main-axis baseline is the baseline of those flex items. |
| 12 --> |
| 13 <html> |
| 14 <head> |
| 15 <title>CSS Test: Testing the baseline of a horizontal flex container with base
line-aligned flex items</title> |
| 16 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> |
| 17 <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-baselines"> |
| 18 <link rel="match" href="flexbox-baseline-align-self-baseline-horiz-001-ref.htm
l"> |
| 19 <meta charset="utf-8"> |
| 20 <style> |
| 21 body { |
| 22 margin: 0; |
| 23 font-size: 20px; |
| 24 line-height: 20px; |
| 25 } |
| 26 .flexContainer { |
| 27 display: inline-flex; |
| 28 background: lightblue; |
| 29 align-items: baseline; |
| 30 } |
| 31 .hugeAndUnaligned { |
| 32 font-size: 35px; |
| 33 line-height: 35px; |
| 34 /* This one flex item won't be baseline-aligned, so it won't impact |
| 35 the flex container's positioning */ |
| 36 align-self: stretch; |
| 37 } |
| 38 .smallFont { |
| 39 font-size: 10px; |
| 40 line-height: 10px; |
| 41 } |
| 42 </style> |
| 43 </head> |
| 44 <body> |
| 45 a |
| 46 <div class="flexContainer"> |
| 47 <div class="smallFont">b</div> |
| 48 <div>c</div> |
| 49 <div class="hugeAndUnaligned">d</div> |
| 50 </div> |
| 51 <div class="flexContainer"> |
| 52 <div class="hugeAndUnaligned">e</div> |
| 53 <div>f</div> |
| 54 <div class="smallFont">g</div> |
| 55 </div> |
| 56 <div class="flexContainer"> |
| 57 <div class="hugeAndUnaligned">h</div> |
| 58 <div class="smallFont">i</div> |
| 59 <div>j</div> |
| 60 </div> |
| 61 </body> |
| 62 </html> |
OLD | NEW |