Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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 absolutely positioned 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 | .abspos { |
michael@0 | 18 | position: absolute; |
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 abspos: --> |
michael@0 | 54 | <div class="flexbox" |
michael@0 | 55 | ><div class="a abspos" style="width: 30px"/><div class="b"/></div> |
michael@0 | 56 | <!-- Second child abspos: --> |
michael@0 | 57 | <div class="flexbox" |
michael@0 | 58 | ><div class="a"/><div class="b abspos" style="width: 20px"/></div> |
michael@0 | 59 | <!-- Middle child abspos: --> |
michael@0 | 60 | <div class="flexbox" |
michael@0 | 61 | ><div class="a" style="width: 80px" |
michael@0 | 62 | /><div class="inflex abspos" |
michael@0 | 63 | /><div class="b" style="width: 120px"/></div> |
michael@0 | 64 | <!-- Third child abspos, 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 abspos" 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> |