layout/reftests/w3c-css/submitted/flexbox/flexbox-with-pseudo-elements-2-ref.html

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

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 <!-- Reference case where we've swapped in actual divs (fakeBefore/fakeAfter)
michael@0 7 for the testcase's ::before and ::after generated content.
michael@0 8
michael@0 9 fakeBefore div is always the first child; fakeAfter is always the last.
michael@0 10 -->
michael@0 11 <html>
michael@0 12 <head>
michael@0 13 <title>CSS Reftest Reference</title>
michael@0 14 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
michael@0 15 <meta charset="utf-8">
michael@0 16 <style>
michael@0 17 .flexContainer {
michael@0 18 display: flex;
michael@0 19 margin-bottom: 2px;
michael@0 20 background: lightgray;
michael@0 21 }
michael@0 22 .fakeBefore {
michael@0 23 background: yellow;
michael@0 24 /* This 'order' value should place us after the other elements, visually,
michael@0 25 even though we're ::before. */
michael@0 26 order: 1;
michael@0 27 }
michael@0 28 .fakeAfter {
michael@0 29 background: lightblue;
michael@0 30 order: -1;
michael@0 31 }
michael@0 32 </style>
michael@0 33 </head>
michael@0 34 <body>
michael@0 35 <!-- 'b' should be at end, due to its high 'order' value: -->
michael@0 36 <div class="flexContainer">
michael@0 37 <div class="fakeBefore">b</div>
michael@0 38 <div>I</div>
michael@0 39 </div>
michael@0 40
michael@0 41 <!-- 'b' should be at beginning, since it's '::before' and the other item has
michael@0 42 a matching 'order' value: -->
michael@0 43 <div class="flexContainer">
michael@0 44 <div class="fakeBefore">b</div>
michael@0 45 <div style="order: 1">I</div>
michael@0 46 </div>
michael@0 47
michael@0 48 <!-- 'a' should be at beginning, due to its low 'order' value: -->
michael@0 49 <div class="flexContainer">
michael@0 50 <div>I</div>
michael@0 51 <div class="fakeAfter">a</div>
michael@0 52 </div>
michael@0 53
michael@0 54 <!-- 'a' should be at end, since it's '::after' and the other item has
michael@0 55 a matching 'order' value: -->
michael@0 56 <div class="flexContainer">
michael@0 57 <div style="order: -1">I</div>
michael@0 58 <div class="fakeAfter">a</div>
michael@0 59 </div>
michael@0 60
michael@0 61 <!-- As above, the ::after 'a' should be at beginning, and the ::before 'b'
michael@0 62 should be at end, due to their 'order' values -->
michael@0 63 <div class="flexContainer">
michael@0 64 <div class="fakeBefore">b</div>
michael@0 65 <div>I</div>
michael@0 66 <div class="fakeAfter">a</div>
michael@0 67 </div>
michael@0 68
michael@0 69 <!-- ...but now the normal item "I" has its order increased, so it'll go
michael@0 70 at the end. -->
michael@0 71 <div class="flexContainer">
michael@0 72 <div class="fakeBefore">b</div>
michael@0 73 <div style="order: 1">I</div>
michael@0 74 <div class="fakeAfter">a</div>
michael@0 75 </div>
michael@0 76
michael@0 77 <!-- ...and now the normal item "I" has its order reduced, so it'll go
michael@0 78 at the beginning. -->
michael@0 79 <div class="flexContainer">
michael@0 80 <div class="fakeBefore">b</div>
michael@0 81 <div style="order: -1">I</div>
michael@0 82 <div class="fakeAfter">a</div>
michael@0 83 </div>
michael@0 84 </body>
michael@0 85 </html>

mercurial