layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-multi-item-vert-1.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 items, none of which have "align-self:baseline".  The
     8      spec says this about this case:
     9        ...if the flex container has at least one flex item, and its
    10        first flex item has a baseline parallel to the flex
    11        container's main axis, the flex container's main-axis
    12        baseline is that baseline.
    13 -->
    14 <html>
    15 <head>
    16   <title>CSS Test: Testing the baseline of a vertical flex container whose flex items are not baseline-aligned</title>
    17   <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
    18   <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-baselines">
    19   <link rel="match" href="flexbox-baseline-multi-item-vert-1-ref.html">
    20   <meta charset="utf-8">
    21   <link rel="stylesheet" type="text/css" href="support/ahem.css" />
    22   <style>
    23     body {
    24       margin: 0;
    25       font: 20px Ahem;
    26       line-height: 20px;
    27       /* Baseline is 0.8em = 16px from top */
    28     }
    29     .flexContainer {
    30       display: inline-flex;
    31       flex-direction: column;
    32       background: lightblue;
    33     }
    34     .smallFont {
    35       font-size: 10px;
    36       line-height: 10px;
    37       /* Baseline is 0.8em = 8px from top */
    38     }
    39     .bigFont {
    40       font-size: 20px;
    41       line-height: 20px;
    42       /* Baseline is 0.8em = 16px from top */
    43     }
    44   </style>
    45 </head>
    46 <body>
    47   a
    48   <div class="flexContainer">
    49     <div class="smallFont">b</div
    50     ><div class="bigFont">c</div>
    51   </div>
    52   <div class="flexContainer">
    53     <div class="bigFont">d</div
    54     ><div class="smallFont">e</div>
    55   </div>
    56 </body>
    57 </html>

mercurial