1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/flexbox/flexbox-position-absolute-2.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,71 @@ 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 + In this testcase, we simply specify "position: absolute" without 1.12 + actually doing any positioning, to test the "static position" of these 1.13 + children. 1.14 +--> 1.15 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.16 + <head> 1.17 + <style> 1.18 + div.containingBlock { 1.19 + top: 15px; 1.20 + left: 20px; 1.21 + height: 400px; 1.22 + position: absolute; 1.23 + border: 2px dashed purple; 1.24 + } 1.25 + .abspos { 1.26 + position: absolute; 1.27 + border: 2px dotted black; 1.28 + } 1.29 + div.flexbox { 1.30 + width: 200px; 1.31 + height: 100px; 1.32 + display: flex; 1.33 + } 1.34 + div.a { 1.35 + flex: 1 0 auto; 1.36 + width: 30px; 1.37 + height: 100px; 1.38 + background: lightgreen; 1.39 + } 1.40 + div.b { 1.41 + flex: 2 0 auto; 1.42 + width: 20px; 1.43 + height: 100px; 1.44 + background: yellow; 1.45 + } 1.46 + div.inflex { 1.47 + flex: none; 1.48 + width: 20px; 1.49 + height: 100px; 1.50 + background: gray; 1.51 + } 1.52 + div.noFlexFn { 1.53 + width: 15px; 1.54 + height: 15px; 1.55 + background: teal; 1.56 + } 1.57 + </style> 1.58 + </head> 1.59 + <body> 1.60 + <div class="containingBlock"> 1.61 + <!-- First child abspos: --> 1.62 + <div class="flexbox"><div class="a abspos"/><div class="b"/></div> 1.63 + <!-- Second child abspos: --> 1.64 + <div class="flexbox"><div class="a"/><div class="b abspos"/></div> 1.65 + <!-- Middle child abspos: --> 1.66 + <div class="flexbox" 1.67 + ><div class="a"/><div class="inflex abspos"/><div class="b"/></div> 1.68 + <!-- Third child abspos, w/ inflexible items & justify-content: space-around: --> 1.69 + <div class="flexbox" style="justify-content: space-around" 1.70 + ><div class="inflex"/><div class="inflex"/><div class="inflex" 1.71 + /><div class="noFlexFn abspos"/><div class="inflex"/></div> 1.72 + </div> 1.73 + </body> 1.74 +</html>