1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
<!DOCTYPE html>
<html>
<head>
<title>CSS Regions: Auto-height regions inside a fixed sized flexbox with column wrap flow</title>
<link rel="author" title="Catalin Badea" href="mailto:badea@adobe.com">
<link rel="help" href="http://www.w3.org/TR/css3-regions/#rfcb-flow-fragment-height-resolution">
<link rel="help" href="http://www.w3.org/TR/css3-regions/#the-flow-into-property">
<link rel="help" href="http://www.w3.org/TR/css3-regions/#flow-from">
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#layout-algorithm">
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#propdef-flex-wrap">
<meta name="flags" content="ahem">
<meta name="assert" content="Test checks the layout of auto-height regions placed inside a flexbox with a fixed
size and column wrap flow. The flex container should have two columns with three regions each.">
<link rel="match" href="reference/autoheight-regions-in-fixed-sized-flexbox-003-ref.html">
<style>
.content {
font-family: Ahem;
line-height: 1em;
font-size: 20px;
}
#c1 {
flow-into: f1;
color: green;
}
#c2 {
flow-into: f2;
color: blue;
}
.flex {
height: 120px;
width: 200px;
display: flex;
flex-direction: column;
flex-wrap: wrap;
}
.region1 {
flow-from: f1;
width: 100px;
margin-right: 20px;
}
.region2 {
flow-from: f2;
break-after: always;
width: 100px;
margin-right: 20px;
}
.break {
/* Current (Jul 2013) standard way of region breaking */
break-after: region;
/* Old, non-standard but implemented way of region breaking */
region-break-after: always;
}
.red {
background-color: red;
}
</style>
</head>
<body>
<ul>
<li>Test passes if you see two columns with a total of 6 alternating horizontal green and blue stripes.</li>
<li>You shouldn't see any red.</li>
</ul>
<div class="content" id="c1">
XXXXX<br>
XXXXX
<div class="break"></div>
XXXXX<br>
XXXXX
<div class="break"></div>
XXXXX<br>
XXXXX
</div>
</div>
<div class="content" id="c2">
XXXXX<br>
XXXXX
<div class="break"></div>
XXXXX<br>
XXXXX
<div class="break"></div>
XXXXX<br>
XXXXX
</div>
<div class="flex">
<div class="region1">
</div>
<div class="region2">
</div>
<div class="region1">
</div>
<div class="region2">
</div>
<div class="region1">
</div>
<div class="region2">
<p class="red"> </p>
</div>
</div>
</body>
</html>
|