layout/reftests/w3c-css/submitted/flexbox/flexbox-sizing-vert-2.xhtml

Thu, 15 Jan 2015 21:13:52 +0100

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

Remove forgotten relic of ABI crash risk averse overloaded method change.

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!--
     3      Any copyright is dedicated to the Public Domain.
     4      http://creativecommons.org/publicdomain/zero/1.0/
     5 -->
     6 <!--
     7      This testcase checks how "min-width" and "max-width" affect the sizing
     8      of vertical flex containers that have no explicit "width" property.
     9 -->
    10 <html xmlns="http://www.w3.org/1999/xhtml">
    11   <head>
    12     <title>CSS Test: Testing sizing of an auto-sized vertical flex container with min-width and max-width constraints</title>
    13     <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
    14     <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#layout-algorithm"/>
    15     <link rel="match" href="flexbox-sizing-vert-2-ref.xhtml"/>
    16     <style>
    17       div { height: 100px; }
    18       div.flexbox {
    19         float: left;
    20         border: 1px dashed blue;
    21         background: lightgreen;
    22         font-size: 10px;
    23         display: flex;
    24         margin-right: 10px;
    25       }
    26     </style>
    27   </head>
    28   <body>
    29     <!-- floated auto-width vertical flexbox should shrinkwrap its contents. -->
    30     <div class="flexbox">
    31       <div>AB</div>
    32     </div>
    34     <!-- Adding a small min-size shouldn't affect that. -->
    35     <div class="flexbox" style="min-width: 2px">
    36       <div>AB</div>
    37     </div>
    39     <!-- ...nor should a large max-size. -->
    40     <div class="flexbox" style="max-width: 300px">
    41       <div>AB</div>
    42     </div>
    44     <!-- OK. Now, if we set a minimum size that's larger than the shrinkwrap
    45          size, we should jump up to that size.-->
    46     <div class="flexbox" style="min-width: 30px">
    47       <div>AB</div>
    48     </div>
    50     <!-- If we set a maximum size that's smaller than the shrinkwrap size,
    51          we should max out at that size.-->
    52     <div class="flexbox" style="max-width: 3px">
    53       <div>AB</div>
    54     </div>
    56     <!-- But if we add a min-size, it beats the max-size. -->
    57     <div class="flexbox" style="min-width: 30px; max-width: 5px">
    58       <div>AB</div>
    59     </div>
    61   </body>
    62 </html>

mercurial