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.

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

mercurial