flexbox-single-column-vertical-rl-1i.html (3559B)
1 <!DOCTYPE html> 2 <!-- Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/publicdomain/zero/1.0/ --> 4 <html> 5 <meta charset="utf-8"> 6 <title>CSS Flexbox Test: Fragmentation of block-size:auto single-line column flex container with fixed block-size flex items</title> 7 <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com"> 8 <link rel="author" title="Mozilla" href="http://www.mozilla.org/"> 9 <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination"> 10 <link rel="match" href="flexbox-single-column-vertical-rl-1-ref.html"> 11 <meta name="assert" content="This test verifies fragmentation of fixed block-size flex items in a block-size:auto single-line column flex container, with various combinations of margin/border/padding, alignments, and row-gap. Also use a script to shrink multicol block-size."> 12 13 <style> 14 html { 15 writing-mode: vertical-rl; 16 } 17 .multicol { 18 block-size: 80px; 19 inline-size: 190px; 20 column-width: 40px; 21 column-fill: auto; 22 column-gap: 10px; 23 border: 5px solid orange; 24 margin-block-end: 5px; /* Just to separate each sub-testcase visually. */ 25 } 26 .flexContainer { 27 display: flex; 28 flex-wrap: nowrap; 29 flex-direction: column; 30 background: gray; 31 /* border-width is 0 by default; some sub-testcases will increase it. */ 32 border: 0 solid lightgray; 33 } 34 .border-padding { 35 border-block-width: 10px; 36 padding-block: 5px; 37 } 38 39 /* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */ 40 header { 41 background: cyan; 42 block-size: 50px; 43 } 44 nav, article, footer { 45 inline-size: 30px; 46 } 47 nav { 48 background: magenta; 49 block-size: 25px; 50 align-self: flex-start; 51 } 52 article { 53 background: yellow; 54 block-size: 25px; 55 align-self: center; 56 } 57 footer { 58 background: black; 59 block-size: 50px; 60 align-self: flex-end; 61 } 62 63 body.multicol-children-block-size > .multicol { 64 block-size: 50px; 65 } 66 </style> 67 68 <script> 69 function runTest() { 70 document.body.offsetHeight; 71 72 /* Shrink the multicol's block-size to exercise pulling and pushing flex items 73 of an already fragmented flex container. */ 74 document.body.classList.add("multicol-children-block-size"); 75 } 76 </script> 77 78 <body onload="runTest()"> 79 <!-- Basic one without any margin/border/padding. --> 80 <div class="multicol"> 81 <div class="flexContainer"> 82 <header></header><nav></nav><article></article><footer></footer> 83 </div> 84 </div> 85 86 <!-- Test a container with margin-block-start. --> 87 <div class="multicol"> 88 <div class="flexContainer" style="margin-block-start: 25px"> 89 <header></header><nav></nav><article></article><footer></footer> 90 </div> 91 </div> 92 93 <!-- Test a container not at the top of the column/page. --> 94 <div class="multicol"> 95 <div style="block-size: 25px"></div> 96 <div class="flexContainer"> 97 <header></header><nav></nav><article></article><footer></footer> 98 </div> 99 </div> 100 101 <!-- Test a container with border and padding. --> 102 <div class="multicol"> 103 <div class="flexContainer border-padding"> 104 <header></header><nav></nav><article></article><footer></footer> 105 </div> 106 </div> 107 108 <!-- Test a container with border, padding, and row-gap. --> 109 <div class="multicol"> 110 <div class="flexContainer border-padding" style="row-gap: 5px"> 111 <header></header><nav></nav><article></article><footer></footer> 112 </div> 113 </div> 114 </body> 115 </html>