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