layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-multi-line-vert-2.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <!DOCTYPE html>
michael@0 2 <!--
michael@0 3 Any copyright is dedicated to the Public Domain.
michael@0 4 http://creativecommons.org/publicdomain/zero/1.0/
michael@0 5 -->
michael@0 6 <!-- Testcase for how we compute the baseline of a vertical flex container
michael@0 7 with several flex lines (wrapping in the reverse direction).
michael@0 8 The spec says this about this case:
michael@0 9 [Given that the first line has no baseline-aligned items:]
michael@0 10 ...if the flex container has at least one flex item, and its
michael@0 11 first flex item has a baseline parallel to the flex
michael@0 12 container's main axis, the flex container's main-axis
michael@0 13 baseline is that baseline.
michael@0 14 -->
michael@0 15 <html>
michael@0 16 <head>
michael@0 17 <title>CSS Test: Testing the baseline of a vertical flex container with multiple flex lines</title>
michael@0 18 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
michael@0 19 <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-baselines">
michael@0 20 <link rel="match" href="flexbox-baseline-multi-line-vert-2-ref.html">
michael@0 21 <meta charset="utf-8">
michael@0 22 <style>
michael@0 23 .flexContainer {
michael@0 24 display: inline-flex;
michael@0 25 flex-direction: column;
michael@0 26 flex-wrap: wrap-reverse;
michael@0 27 width: 40px;
michael@0 28 height: 40px;
michael@0 29 background: lightblue;
michael@0 30 }
michael@0 31 .flexContainer > * {
michael@0 32 width: 20px;
michael@0 33 height: 20px;
michael@0 34 }
michael@0 35
michael@0 36 /* We'll make the second flex line not paint anything, so that the
michael@0 37 reference case doesn't need to bother matching it. */
michael@0 38 .flexContainer > *:nth-child(3),
michael@0 39 .flexContainer > *:nth-child(4) {
michael@0 40 visibility: hidden;
michael@0 41 }
michael@0 42
michael@0 43 .smallFont {
michael@0 44 font-size: 8px;
michael@0 45 line-height: 8px;
michael@0 46 }
michael@0 47 .medFont {
michael@0 48 font-size: 12px;
michael@0 49 line-height: 12px;
michael@0 50 }
michael@0 51 .bigFont {
michael@0 52 font-size: 16px;
michael@0 53 line-height: 16px;
michael@0 54 }
michael@0 55 </style>
michael@0 56 </head>
michael@0 57 <body>
michael@0 58 a
michael@0 59 <!-- Flex containers with flex items that have a mix of baselines: -->
michael@0 60 <div class="flexContainer">
michael@0 61 <div class="medFont">b</div
michael@0 62 ><div class="bigFont">c</div
michael@0 63 ><div class="bigFont">d</div
michael@0 64 ><div class="medFont">e</div>
michael@0 65 </div>
michael@0 66
michael@0 67 <div class="flexContainer">
michael@0 68 <div class="bigFont">f</div
michael@0 69 ><div class="smallFont">g</div
michael@0 70 ><div class="medFont">h</div
michael@0 71 ><div class="bigFont">i</div>
michael@0 72 </div>
michael@0 73
michael@0 74 <!-- Flex container with second line baseline-aligned
michael@0 75 (shouldn't make a difference) -->
michael@0 76 <div class="flexContainer">
michael@0 77 <div class="smallFont">j</div
michael@0 78 ><div class="bigFont">k</div
michael@0 79 ><div class="bigFont" style="align-self: baseline">l</div
michael@0 80 ><div class="medFont" style="align-self: baseline">m</div>
michael@0 81 </div>
michael@0 82 n
michael@0 83
michael@0 84 </body>
michael@0 85 </html>

mercurial