layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-align-self-baseline-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-align-self-baseline-vert-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,68 @@
     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 with
    1.10 +     several flex items, some of which have "align-self:baseline".  Since we're
    1.11 +     vertical and the items' baselines are horizontal, they do not end up
    1.12 +     participating in baseline alignment, so their "align-self:baseline"
    1.13 +     computed style doesn't have any special effect on the container's
    1.14 +     baseline.
    1.15 +-->
    1.16 +<html>
    1.17 +<head>
    1.18 +  <title>CSS Test: Testing the baseline of a vertical flex container with baseline-aligned flex items</title>
    1.19 +  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
    1.20 +  <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-baselines">
    1.21 +  <link rel="match" href="flexbox-baseline-align-self-baseline-vert-1-ref.html">
    1.22 +  <meta charset="utf-8">
    1.23 +  <link rel="stylesheet" type="text/css" href="support/ahem.css" />
    1.24 +  <style>
    1.25 +    body {
    1.26 +      margin: 0;
    1.27 +      font: 20px Ahem;
    1.28 +      line-height: 20px;
    1.29 +      /* Baseline is 0.8em = 16px from top */
    1.30 +    }
    1.31 +    .flexContainer {
    1.32 +      display: inline-flex;
    1.33 +      flex-direction: column;
    1.34 +      display: -webkit-inline-flex;
    1.35 +      -webkit-flex-direction: column;
    1.36 +      background: lightblue;
    1.37 +      align-items: baseline;
    1.38 +    }
    1.39 +    .hugeAndUnaligned {
    1.40 +      font-size: 35px;
    1.41 +      line-height: 35px;
    1.42 +      /* This one flex item won't be baseline-aligned, so it won't impact
    1.43 +         the flex container's positioning */
    1.44 +      align-self: stretch;
    1.45 +    }
    1.46 +    .smallFont {
    1.47 +      font-size: 10px;
    1.48 +      line-height: 10px;
    1.49 +      /* Baseline is 0.8em = 8px from top */
    1.50 +    }
    1.51 +  </style>
    1.52 +</head>
    1.53 +<body>
    1.54 +  a
    1.55 +  <div class="flexContainer">
    1.56 +    <div class="smallFont">b</div>
    1.57 +    <div>c</div>
    1.58 +    <div class="hugeAndUnaligned">d</div>
    1.59 +  </div>
    1.60 +  <div class="flexContainer">
    1.61 +    <div class="hugeAndUnaligned">e</div>
    1.62 +    <div>f</div>
    1.63 +    <div class="smallFont">g</div>
    1.64 +  </div>
    1.65 +  <div class="flexContainer">
    1.66 +    <div class="hugeAndUnaligned">h</div>
    1.67 +    <div class="smallFont">i</div>
    1.68 +    <div>j</div>
    1.69 +  </div>
    1.70 +</body>
    1.71 +</html>

mercurial