layout/reftests/w3c-css/submitted/flexbox/flexbox-margin-auto-horiz-2.xhtml

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-margin-auto-horiz-2.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,68 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     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 with a variety of 'display: flex' examples
    1.10 +     with margin-top and/or margin-bottom set to 'auto' on flex items. -->
    1.11 +<html xmlns="http://www.w3.org/1999/xhtml">
    1.12 +  <head>
    1.13 +    <title>CSS Test: Testing vertical auto margins on flex items in a horizontal flex container</title>
    1.14 +    <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
    1.15 +    <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#auto-margins"/>
    1.16 +    <link rel="match" href="flexbox-margin-auto-horiz-2-ref.xhtml"/>
    1.17 +    <style>
    1.18 +      div.flexbox {
    1.19 +        border: 2px dotted black;
    1.20 +        display: flex;
    1.21 +        margin-bottom: 2px;
    1.22 +        width: 100px;
    1.23 +      }
    1.24 +      div.fixedSize {
    1.25 +        width:  20px;
    1.26 +        height: 20px;
    1.27 +      }
    1.28 +      div.gray        { background: gray;  }
    1.29 +      div.green       { background: green; }
    1.30 +      div.pink        { background: pink;  }
    1.31 +      div.blue        { background: blue;  }
    1.32 +
    1.33 +      div.autoTop     { margin-top:    auto; }
    1.34 +      div.autoBottom  { margin-bottom: auto; }
    1.35 +      div.fixedTop    { margin-top:    10px; }
    1.36 +      div.fixedBottom { margin-bottom: 10px; }
    1.37 +    </style>
    1.38 +  </head>
    1.39 +  <body>
    1.40 +
    1.41 +    <!-- fixed-height flexbox, with items that have auto margins -->
    1.42 +    <div class="flexbox" style="height: 100px">
    1.43 +      <div class="fixedSize green autoTop"/>
    1.44 +      <div class="fixedSize pink  autoBottom"/>
    1.45 +      <div class="fixedSize blue  autoTop autoBottom"/>
    1.46 +    </div>
    1.47 +    <!-- fixed-height flexbox, with items that have auto & fixed margins -->
    1.48 +    <div class="flexbox" style="height: 100px">
    1.49 +      <div class="fixedSize green autoTop fixedBottom"/>
    1.50 +      <div class="fixedSize pink  autoBottom fixedTop"/>
    1.51 +    </div>
    1.52 +
    1.53 +    <!-- height-shrinkwrapping flexbox, sized by item w/ fixed height & margins,
    1.54 +         with other items that have auto margins -->
    1.55 +    <div class="flexbox">
    1.56 +      <div class="fixedSize green autoTop"/>
    1.57 +      <div class="fixedSize pink autoBottom"/>
    1.58 +      <div class="fixedSize blue autoTop autoBottom"/>
    1.59 +      <div class="fixedTop fixedBottom gray" style="width: 10px; height: 30px"/>
    1.60 +    </div>
    1.61 +
    1.62 +    <!-- height-shrinkwrapping flexbox, sized by item w/ fixed height & margins,
    1.63 +         with other items that have auto & fixed margins -->
    1.64 +    <div class="flexbox">
    1.65 +      <div class="fixedSize green autoTop fixedBottom"/>
    1.66 +      <div class="fixedSize pink  autoBottom fixedTop"/>
    1.67 +      <div class="fixedTop fixedBottom gray" style="width: 10px; height: 30px"/>
    1.68 +    </div>
    1.69 +
    1.70 +  </body>
    1.71 +</html>

mercurial