flexbox-multi-row-2b.html (3281B)
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 fixed block-size multi-line row-reverse 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-multi-row-2-ref.html"> 11 <meta name="assert" content="This test verifies fragmentation of fixed block-size flex items in a fixed block-size multi-line row flex container, with various combinations of margin/border/padding, alignments, and gap."> 12 13 <style> 14 .multicol { 15 block-size: 70px; 16 inline-size: 200px; 17 column-width: 60px; 18 column-fill: auto; 19 column-gap: 10px; 20 border: 5px solid orange; 21 margin-block-end: 5px; /* Just to separate each sub-testcase visually. */ 22 } 23 .flexContainer { 24 display: flex; 25 flex-wrap: wrap-reverse; 26 flex-direction: row-reverse; 27 background: gray; 28 /* border-width is 0 by default; some sub-testcases will increase it. */ 29 border: 0 solid lightgray; 30 block-size: 140px; 31 } 32 .border-padding { 33 border-block-width: 10px; 34 padding-block: 5px; 35 } 36 .with-gap { 37 row-gap: 20px; 38 column-gap: 10px; 39 } 40 41 header, nav, article, footer { 42 inline-size: 30px; 43 } 44 .with-gap header, .with-gap nav, .with-gap article, .with-gap footer { 45 inline-size: 25px; 46 } 47 48 /* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */ 49 footer { 50 background: cyan; 51 block-size: 50px; 52 align-self: flex-end; 53 } 54 article { 55 background: magenta; 56 block-size: 25px; 57 align-self: flex-end; 58 } 59 nav { 60 background: yellow; 61 block-size: 40px; 62 align-self: center; 63 } 64 header { 65 background: black; 66 block-size: 50px; 67 align-self: flex-start; 68 } 69 </style> 70 71 <body> 72 <!-- Basic one without any margin/border/padding. --> 73 <div class="multicol"> 74 <div class="flexContainer"> 75 <header></header><nav></nav><article></article><footer></footer> 76 </div> 77 </div> 78 79 <!-- Test a container with margin-block-start. --> 80 <div class="multicol"> 81 <div class="flexContainer" style="margin-block-start: 25px"> 82 <header></header><nav></nav><article></article><footer></footer> 83 </div> 84 </div> 85 86 <!-- Test a container not at the top of the column/page. --> 87 <div class="multicol"> 88 <div style="block-size: 25px"></div> 89 <div class="flexContainer"> 90 <header></header><nav></nav><article></article><footer></footer> 91 </div> 92 </div> 93 94 <!-- Test a container with border and padding. --> 95 <div class="multicol"> 96 <div class="flexContainer border-padding"> 97 <header></header><nav></nav><article></article><footer></footer> 98 </div> 99 </div> 100 101 <!-- Test a container with border, padding, and gap. --> 102 <div class="multicol"> 103 <div class="flexContainer border-padding with-gap"> 104 <header></header><nav></nav><article></article><footer></footer> 105 </div> 106 </div> 107 </body> 108 </html>