layout/reftests/flexbox/flexbox-minSize-horiz-1.xhtml

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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 test checks that we correctly handle flex items with an explicit
     8      "min-width: -moz-min-content".
    10      We check that such flex items can't shrink below their min-content width,
    11      unless we explicitly reduce their min-width with e.g. "min-width: 0".
    12 -->
    13 <html xmlns="http://www.w3.org/1999/xhtml">
    14   <head>
    15     <style>
    16       div.flexbox {
    17         width: 200px;
    18         display: flex;
    19         margin-bottom: 5px;
    20         font-size: 8px;
    21         border: 1px dotted black;
    22       }
    23       div.flexbox > * {
    24         margin-right: 20px;
    25         border: 1px dashed green;
    26         background: lightblue;
    27         height: 40px;
    28         min-width: -moz-min-content;
    29       }
    30       div.smallSize      { width: 5px; }
    31       div.smallFlexBasis { flex-basis: 2px; }
    32       div.zeroMinWidth   { min-width: 0; }
    34     </style>
    35   </head>
    36   <body>
    38     <!-- Check that we honor "min-width: min-content" as a lower-bound when
    39          sizing flex items. -->
    40     <div class="flexbox">
    41       <div>abc d e f</div>
    42       <div class="smallSize">abc d e f</div>
    43       <div class="smallFlexBasis">abc d e f</div>
    44     </div>
    46     <!-- ... EVEN if our flex container is small and we're overflowing. -->
    47     <div class="flexbox smallSize">
    48       <div>abc d e f</div>
    49       <div class="smallSize">abc d e f</div>
    50       <div class="smallFlexBasis">abc d e f</div>
    51     </div>
    53     <!-- Test that we don't clamp when we've got "min-width: 0" on our
    54          flex items, though. -->
    55     <div class="flexbox">
    56       <div class="zeroMinWidth">abc d e f</div>
    57       <div class="zeroMinWidth smallSize">abc d e f</div>
    58       <div class="zeroMinWidth smallFlexBasis">abc d e f</div>
    59     </div>
    61     <!-- ... and similarly, when we have a small flex container and we trigger
    62          shrinking behavior, flex items with "min-width: 0" are allowed to
    63          shrink past their min-content width. -->
    64     <div class="flexbox smallSize">
    65       <div class="zeroMinWidth">abc d e f</div>
    66       <div class="zeroMinWidth smallSize">abc d e f</div>
    67       <div class="zeroMinWidth smallFlexBasis">abc d e f</div>
    68     </div>
    70   </body>
    71 </html>

mercurial