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

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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 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 horizontal 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-horiz-2-ref.html">
    21   <meta charset="utf-8">
    22   <style>
    23     .flexContainer {
    24       display: inline-flex;
    25       flex-wrap: wrap-reverse;
    26       width: 40px;
    27       height: 40px;
    28       background: lightblue;
    29     }
    30     .flexContainer > * {
    31       width: 20px;
    32     }
    34     /* We'll make the second flex line not paint anything, so that the
    35        reference case doesn't need to bother matching it. */
    36     .flexContainer > *:nth-child(3),
    37     .flexContainer > *:nth-child(4) {
    38       visibility: hidden;
    39     }
    41     .smallFont {
    42       font-size: 8px;
    43       line-height: 8px;
    44     }
    45     .medFont {
    46       font-size: 12px;
    47       line-height: 12px;
    48     }
    49     .bigFont {
    50       font-size: 16px;
    51       line-height: 16px;
    52     }
    53   </style>
    54 </head>
    55 <body>
    56   a
    57   <!-- Flex containers with flex items that have a mix of baselines: -->
    58   <div class="flexContainer">
    59     <div class="medFont">b</div
    60     ><div class="bigFont">c</div
    61     ><div class="bigFont">d</div
    62     ><div class="medFont">e</div>
    63   </div>
    65   <div class="flexContainer">
    66     <div class="bigFont">f</div
    67     ><div class="smallFont">g</div
    68     ><div class="medFont">h</div
    69     ><div class="bigFont">i</div>
    70   </div>
    72   <!-- Flex container with second line baseline-aligned
    73        (shouldn't make a difference) -->
    74   <div class="flexContainer">
    75     <div class="smallFont">j</div
    76     ><div class="bigFont">k</div
    77     ><div class="bigFont" style="align-self: baseline">l</div
    78     ><div class="medFont" style="align-self: baseline">m</div>
    79   </div>
    80   n
    82 </body>
    83 </html>

mercurial