layout/reftests/flexbox/flexbox-position-fixed-2-ref.xhtml

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

michael@0 1 <?xml version="1.0" encoding="UTF-8"?>
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 for fixed-position children of a flex container. -->
michael@0 7 <html xmlns="http://www.w3.org/1999/xhtml">
michael@0 8 <head>
michael@0 9 <style>
michael@0 10 div.containingBlock {
michael@0 11 top: 15px;
michael@0 12 left: 20px;
michael@0 13 height: 400px;
michael@0 14 position: absolute;
michael@0 15 border: 2px dashed purple;
michael@0 16 }
michael@0 17 .fixedpos {
michael@0 18 position: fixed;
michael@0 19 border: 2px dotted black;
michael@0 20 }
michael@0 21 div.flexbox {
michael@0 22 width: 200px;
michael@0 23 height: 100px;
michael@0 24 }
michael@0 25 div.a {
michael@0 26 width: 100%;
michael@0 27 height: 100px;
michael@0 28 background: lightgreen;
michael@0 29 display: inline-block;
michael@0 30 }
michael@0 31 div.b {
michael@0 32 width: 100%;
michael@0 33 height: 100px;
michael@0 34 background: yellow;
michael@0 35 display: inline-block;
michael@0 36 }
michael@0 37 div.inflex {
michael@0 38 width: 20px;
michael@0 39 height: 100px;
michael@0 40 background: gray;
michael@0 41 display: inline-block;
michael@0 42 }
michael@0 43 div.noFlexFn {
michael@0 44 width: 15px;
michael@0 45 height: 15px;
michael@0 46 background: teal;
michael@0 47 display: inline-block;
michael@0 48 }
michael@0 49 </style>
michael@0 50 </head>
michael@0 51 <body>
michael@0 52 <div class="containingBlock">
michael@0 53 <!-- First child fixedpos: -->
michael@0 54 <div class="flexbox"
michael@0 55 ><div class="a fixedpos" style="width: 30px"/><div class="b"/></div>
michael@0 56 <!-- Second child fixedpos: -->
michael@0 57 <div class="flexbox"
michael@0 58 ><div class="a"/><div class="b fixedpos" style="width: 20px"/></div>
michael@0 59 <!-- Middle child fixedpos: -->
michael@0 60 <div class="flexbox"
michael@0 61 ><div class="a" style="width: 80px"
michael@0 62 /><div class="inflex fixedpos"
michael@0 63 /><div class="b" style="width: 120px"/></div>
michael@0 64 <!-- Third child fixedpos, w/ inflexible items & justify-content: space-around: -->
michael@0 65 <div class="flexbox"
michael@0 66 ><div class="inflex" style="margin-left: 12px"
michael@0 67 /><div class="inflex" style="margin-left: 24px"
michael@0 68 /><div class="inflex" style="margin-left: 24px"
michael@0 69 /><div class="noFlexFn fixedpos" style="margin-left: 24px"
michael@0 70 /><div class="inflex" style="margin-left: 48px"/></div>
michael@0 71 </div>
michael@0 72 </body>
michael@0 73 </html>

mercurial