layout/reftests/w3c-css/submitted/flexbox/flexbox-flex-wrap-horiz-1.html

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.

michael@0 1 <!DOCTYPE html>
michael@0 2 <!--
michael@0 3 Any copyright is dedicated to the Public Domain.
michael@0 4 http://creativecommons.org/publicdomain/zero/1.0/
michael@0 5 -->
michael@0 6 <html>
michael@0 7 <head>
michael@0 8 <title>CSS Test: Testing flex-wrap in horizontal flex containers</title>
michael@0 9 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
michael@0 10 <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#flex-wrap-property">
michael@0 11 <link rel="match" href="flexbox-flex-wrap-horiz-1-ref.html">
michael@0 12 <meta charset="utf-8">
michael@0 13 <style>
michael@0 14 div.flexbox {
michael@0 15 display: flex;
michael@0 16 flex-wrap: wrap;
michael@0 17 border: 1px dashed black;
michael@0 18 width: 100px;
michael@0 19 height: 12px;
michael@0 20 margin-bottom: 2px;
michael@0 21 }
michael@0 22 div.halfMainSize {
michael@0 23 width: 48px;
michael@0 24 border: 1px solid blue;
michael@0 25 background: lightblue;
michael@0 26 }
michael@0 27 div.hugeMainSize {
michael@0 28 width: 148px;
michael@0 29 border: 1px solid purple;
michael@0 30 background: fuchsia;
michael@0 31 }
michael@0 32 </style>
michael@0 33 </head>
michael@0 34 <body>
michael@0 35
michael@0 36 <!-- Single small flex item -->
michael@0 37 <div class="flexbox">
michael@0 38 <div class="halfMainSize"></div>
michael@0 39 </div>
michael@0 40
michael@0 41 <!-- Single small flex item with 'margin-left' set to push it to protrude
michael@0 42 from the far edge of the container (and to shrink as a result) -->
michael@0 43 <div class="flexbox">
michael@0 44 <div class="halfMainSize" style="margin-left: 80px"></div>
michael@0 45 </div>
michael@0 46
michael@0 47 <!-- Single small inflexible flex item with 'margin-left' set to push it to
michael@0 48 protrude from the far edge of the container -->
michael@0 49 <div class="flexbox">
michael@0 50 <div class="halfMainSize" style="margin-left: 80px; flex: none"></div>
michael@0 51 </div>
michael@0 52
michael@0 53 <!-- Two flex items, exactly large enough to fit in line (no wrapping): -->
michael@0 54 <div class="flexbox">
michael@0 55 <div class="halfMainSize"></div>
michael@0 56 <div class="halfMainSize"></div>
michael@0 57 </div>
michael@0 58
michael@0 59 <!-- and now with some margin on first item, to force second item to wrap: -->
michael@0 60 <div class="flexbox">
michael@0 61 <div class="halfMainSize" style="margin-right: 1px"></div>
michael@0 62 <div class="halfMainSize"></div>
michael@0 63 </div>
michael@0 64
michael@0 65 <!-- and now with some margin on second item, again forcing it to wrap: -->
michael@0 66 <div class="flexbox">
michael@0 67 <div class="halfMainSize"></div>
michael@0 68 <div class="halfMainSize" style="margin-right: 1px"></div>
michael@0 69 </div>
michael@0 70
michael@0 71 <!-- Single large flex item: overflows (but does not wrap) and is shrunk
michael@0 72 to fit container's main-size -->
michael@0 73 <div class="flexbox">
michael@0 74 <div class="hugeMainSize"></div>
michael@0 75 </div>
michael@0 76
michael@0 77 <!-- Single large flex item: overflows (but does not wrap) -->
michael@0 78 <div class="flexbox">
michael@0 79 <div class="hugeMainSize" style="flex: none"></div>
michael@0 80 </div>
michael@0 81
michael@0 82 <!-- Small flex item, followed by large flex item (which wraps to
michael@0 83 its own line and then shrink to container's main-size) -->
michael@0 84 <div class="flexbox">
michael@0 85 <div class="halfMainSize"></div>
michael@0 86 <div class="hugeMainSize"></div>
michael@0 87 </div>
michael@0 88
michael@0 89 <!-- Small flex item, followed by large inflexible flex item (which wraps to
michael@0 90 its own line and then shrink to container's main-size) -->
michael@0 91 <div class="flexbox">
michael@0 92 <div class="halfMainSize"></div>
michael@0 93 <div class="hugeMainSize" style="flex: none"></div>
michael@0 94 </div>
michael@0 95
michael@0 96 </body>
michael@0 97 </html>

mercurial