flexbox-multi-row-vertical-lr-1b.html (3286B)
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 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-vertical-lr-1-ref.html"> 11 <meta name="assert" content="This test verifies fragmentation of fixed block-size flex items in a block-size:auto multi-line row flex container, with various combinations of margin/border/padding, alignments, and gap."> 12 13 <style> 14 html { 15 writing-mode: vertical-lr; 16 } 17 .multicol { 18 block-size: 50px; 19 inline-size: 200px; 20 column-width: 60px; 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: wrap-reverse; 29 flex-direction: row-reverse; 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 .with-gap { 39 row-gap: 20px; 40 column-gap: 10px; 41 } 42 43 header, nav, article, footer { 44 inline-size: 30px; 45 } 46 .with-gap header, .with-gap nav, .with-gap article, .with-gap footer { 47 inline-size: 25px; 48 } 49 50 /* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */ 51 footer { 52 background: cyan; 53 block-size: 50px; 54 } 55 article { 56 background: magenta; 57 block-size: 25px; 58 align-self: flex-end; 59 } 60 nav { 61 background: yellow; 62 block-size: 40px; 63 align-self: center; 64 } 65 header { 66 background: black; 67 block-size: 50px; 68 align-self: flex-start; 69 } 70 </style> 71 72 <body> 73 <!-- Basic one without any margin/border/padding. --> 74 <div class="multicol"> 75 <div class="flexContainer"> 76 <header></header><nav></nav><article></article><footer></footer> 77 </div> 78 </div> 79 80 <!-- Test a container with margin-block-start. --> 81 <div class="multicol"> 82 <div class="flexContainer" style="margin-block-start: 25px"> 83 <header></header><nav></nav><article></article><footer></footer> 84 </div> 85 </div> 86 87 <!-- Test a container not at the top of the column/page. --> 88 <div class="multicol"> 89 <div style="block-size: 25px"></div> 90 <div class="flexContainer"> 91 <header></header><nav></nav><article></article><footer></footer> 92 </div> 93 </div> 94 95 <!-- Test a container with border and padding. --> 96 <div class="multicol"> 97 <div class="flexContainer border-padding"> 98 <header></header><nav></nav><article></article><footer></footer> 99 </div> 100 </div> 101 102 <!-- Test a container with border, padding, and gap. --> 103 <div class="multicol"> 104 <div class="flexContainer border-padding with-gap"> 105 <header></header><nav></nav><article></article><footer></footer> 106 </div> 107 </div> 108 </body> 109 </html>