flex-abspos-staticpos-fallback-justify-content-001.html (3353B)
1 <!DOCTYPE html> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html> 7 <head> 8 <title>CSS Test: Static position of abspos children in a row flex container, with various "justify-content" values with explicit fallback values</title> 9 <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> 10 <link rel="help" href="https://drafts.csswg.org/css-flexbox/#abspos-items"> 11 <link rel="match" href="flex-abspos-staticpos-fallback-justify-content-001-ref.html"> 12 <meta charset="utf-8"> 13 <style> 14 .container { 15 display: flex; 16 flex-flow: row; 17 padding: 1px 2px; 18 border: 1px solid black; 19 background: yellow; 20 margin-bottom: 5px; 21 margin-right: 5px; 22 float: left; /* For testing in "rows" of containers */ 23 } 24 br { clear: both } 25 26 .big > .container { 27 height: 10px; 28 width: 16px; 29 } 30 .small > .container { 31 height: 2px; 32 width: 4px; 33 } 34 35 .container > * { 36 position: absolute; 37 background: teal; 38 height: 6px; 39 width: 8px; 40 } 41 </style> 42 </head> 43 <body> 44 <div class="big"> 45 <!-- <content-distribution> with implied fallback --> 46 <div class="container" style="justify-content: space-between"><div></div></div> 47 <div class="container" style="justify-content: space-around"><div></div></div> 48 <div class="container" style="justify-content: space-evenly"><div></div></div> 49 <div class="container" style="justify-content: stretch"><div></div></div> 50 <br> 51 <!-- <content-distribution> with explicit "flex-end" fallback --> 52 <!-- TODO: https://github.com/w3c/csswg-drafts/issues/1002 53 <div class="container" style="justify-content: space-between flex-end"><div></div></div> 54 <div class="container" style="justify-content: space-around flex-end"><div></div></div> 55 <div class="container" style="justify-content: space-evenly flex-end"><div></div></div> 56 <div class="container" style="justify-content: stretch flex-end"><div></div></div> 57 --> 58 <!-- Note: specifically for flex containers, in the justify-content axis, 59 "stretch behaves as flex-start (ignoring the specified fallback 60 alignment, if any." https://drafts.csswg.org/css-align-3/#distribution-flex --> 61 <br> 62 </div> 63 <div class="small"> 64 <!-- <content-distribution> with implied fallback --> 65 <div class="container" style="justify-content: space-between"><div></div></div> 66 <div class="container" style="justify-content: space-around"><div></div></div> 67 <div class="container" style="justify-content: space-evenly"><div></div></div> 68 <div class="container" style="justify-content: stretch"><div></div></div> 69 <br> 70 <!-- <content-distribution> with explicit "flex-end" fallback --> 71 <!-- TODO: https://github.com/w3c/csswg-drafts/issues/1002 72 <div class="container" style="justify-content: space-between flex-end"><div></div></div> 73 <div class="container" style="justify-content: space-around flex-end"><div></div></div> 74 <div class="container" style="justify-content: space-evenly flex-end"><div></div></div> 75 <div class="container" style="justify-content: stretch flex-end"><div></div></div> 76 --> 77 <!-- As noted above, the explicit fallback for "stretch" is ignored here. --> 78 </div> 79 </body> 80 </html>