1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/flexbox/flexbox-position-absolute-1.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,70 @@ 1.4 +<?xml version="1.0" encoding="UTF-8"?> 1.5 +<!-- 1.6 + Any copyright is dedicated to the Public Domain. 1.7 + http://creativecommons.org/publicdomain/zero/1.0/ 1.8 +--> 1.9 +<!-- 1.10 + Testcase with absolutely positioned children of a flex container. 1.11 + This positioning is with respect to the containing block's left edge. 1.12 +--> 1.13 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.14 + <head> 1.15 + <style> 1.16 + div.containingBlock { 1.17 + top: 15px; 1.18 + left: 20px; 1.19 + height: 400px; 1.20 + position: absolute; 1.21 + border: 2px dashed purple; 1.22 + } 1.23 + .abspos { 1.24 + position: absolute; 1.25 + left: 5px; 1.26 + border: 2px dotted black; 1.27 + } 1.28 + div.flexbox { 1.29 + width: 200px; 1.30 + height: 100px; 1.31 + display: flex; 1.32 + } 1.33 + div.a { 1.34 + flex: 1 0 auto; 1.35 + width: 30px; 1.36 + height: 100px; 1.37 + background: lightgreen; 1.38 + } 1.39 + div.b { 1.40 + flex: 2 0 auto; 1.41 + width: 20px; 1.42 + height: 100px; 1.43 + background: yellow; 1.44 + } 1.45 + div.inflex { 1.46 + flex: none; 1.47 + width: 20px; 1.48 + height: 100px; 1.49 + background: gray; 1.50 + } 1.51 + div.noFlexFn { 1.52 + width: 15px; 1.53 + height: 15px; 1.54 + background: teal; 1.55 + } 1.56 + </style> 1.57 + </head> 1.58 + <body> 1.59 + <div class="containingBlock"> 1.60 + <!-- First child abspos: --> 1.61 + <div class="flexbox"><div class="a abspos"/><div class="b"/></div> 1.62 + <!-- Second child abspos: --> 1.63 + <div class="flexbox"><div class="a"/><div class="b abspos"/></div> 1.64 + <!-- Middle child abspos: --> 1.65 + <div class="flexbox" 1.66 + ><div class="a"/><div class="inflex abspos"/><div class="b"/></div> 1.67 + <!-- Third child abspos, w/ inflexible items & justify-content: space-around: --> 1.68 + <div class="flexbox" style="justify-content: space-around" 1.69 + ><div class="inflex"/><div class="inflex"/><div class="inflex" 1.70 + /><div class="noFlexFn abspos"/><div class="inflex"/></div> 1.71 + </div> 1.72 + </body> 1.73 +</html>