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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-multi-line-vert-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,84 @@
     1.4 +<!DOCTYPE html>
     1.5 +<!--
     1.6 +     Any copyright is dedicated to the Public Domain.
     1.7 +     http://creativecommons.org/publicdomain/zero/1.0/
     1.8 +-->
     1.9 +<!-- Testcase for how we compute the baseline of a vertical flex container
    1.10 +     with several flex lines.
    1.11 +     The spec says this about this case:
    1.12 +      [Given that the first line has no baseline-aligned items:]
    1.13 +       ...if the flex container has at least one flex item, and its
    1.14 +       first flex item has a baseline parallel to the flex
    1.15 +       container's main axis, the flex container's main-axis
    1.16 +       baseline is that baseline.
    1.17 +-->
    1.18 +<html>
    1.19 +<head>
    1.20 +  <title>CSS Test: Testing the baseline of a vertical flex container with multiple flex lines</title>
    1.21 +  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
    1.22 +  <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-baselines">
    1.23 +  <link rel="match" href="flexbox-baseline-multi-line-vert-1-ref.html">
    1.24 +  <meta charset="utf-8">
    1.25 +  <style>
    1.26 +    .flexContainer {
    1.27 +      display: inline-flex;
    1.28 +      flex-direction: column;
    1.29 +      flex-wrap: wrap;
    1.30 +      width: 40px;
    1.31 +      height: 40px;
    1.32 +      background: lightblue;
    1.33 +    }
    1.34 +    .flexContainer > * {
    1.35 +      height: 20px;
    1.36 +    }
    1.37 +
    1.38 +    /* We'll make the second flex line not paint anything, so that the
    1.39 +       reference case doesn't need to bother matching it. */
    1.40 +    .flexContainer > *:nth-child(3),
    1.41 +    .flexContainer > *:nth-child(4) {
    1.42 +      visibility: hidden;
    1.43 +    }
    1.44 +
    1.45 +    .smallFont {
    1.46 +      font-size: 8px;
    1.47 +      line-height: 8px;
    1.48 +    }
    1.49 +    .medFont {
    1.50 +      font-size: 12px;
    1.51 +      line-height: 12px;
    1.52 +    }
    1.53 +    .bigFont {
    1.54 +      font-size: 16px;
    1.55 +      line-height: 16px;
    1.56 +    }
    1.57 +  </style>
    1.58 +</head>
    1.59 +<body>
    1.60 +  a
    1.61 +  <!-- Flex containers with flex items that have a mix of baselines: -->
    1.62 +  <div class="flexContainer">
    1.63 +    <div class="medFont">b</div
    1.64 +    ><div class="bigFont">c</div
    1.65 +    ><div class="bigFont">d</div
    1.66 +    ><div class="medFont">e</div>
    1.67 +  </div>
    1.68 +
    1.69 +  <div class="flexContainer">
    1.70 +    <div class="bigFont">f</div
    1.71 +    ><div class="smallFont">g</div
    1.72 +    ><div class="medFont">h</div
    1.73 +    ><div class="bigFont">i</div>
    1.74 +  </div>
    1.75 +
    1.76 +  <!-- Flex container with second line baseline-aligned
    1.77 +       (shouldn't make a difference) -->
    1.78 +  <div class="flexContainer">
    1.79 +    <div class="smallFont">j</div
    1.80 +    ><div class="bigFont">k</div
    1.81 +    ><div class="bigFont" style="align-self: baseline">l</div
    1.82 +    ><div class="medFont" style="align-self: baseline">m</div>
    1.83 +  </div>
    1.84 +  n
    1.85 +
    1.86 +</body>
    1.87 +</html>

mercurial