flexbox-multi-row-vertical-rl-2a.html (3287B)
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 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; 29 flex-direction: row; 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 header { 53 background: cyan; 54 block-size: 50px; 55 } 56 nav { 57 background: magenta; 58 block-size: 25px; 59 align-self: flex-start; 60 } 61 article { 62 background: yellow; 63 block-size: 40px; 64 align-self: center; 65 } 66 footer { 67 background: black; 68 block-size: 50px; 69 align-self: flex-end; 70 } 71 </style> 72 73 <body> 74 <!-- Basic one without any margin/border/padding. --> 75 <div class="multicol"> 76 <div class="flexContainer"> 77 <header></header><nav></nav><article></article><footer></footer> 78 </div> 79 </div> 80 81 <!-- Test a container with margin-block-start. --> 82 <div class="multicol"> 83 <div class="flexContainer" style="margin-block-start: 25px"> 84 <header></header><nav></nav><article></article><footer></footer> 85 </div> 86 </div> 87 88 <!-- Test a container not at the top of the column/page. --> 89 <div class="multicol"> 90 <div style="block-size: 25px"></div> 91 <div class="flexContainer"> 92 <header></header><nav></nav><article></article><footer></footer> 93 </div> 94 </div> 95 96 <!-- Test a container with border and padding. --> 97 <div class="multicol"> 98 <div class="flexContainer border-padding"> 99 <header></header><nav></nav><article></article><footer></footer> 100 </div> 101 </div> 102 103 <!-- Test a container with border, padding, and gap. --> 104 <div class="multicol"> 105 <div class="flexContainer border-padding with-gap"> 106 <header></header><nav></nav><article></article><footer></footer> 107 </div> 108 </div> 109 </body> 110 </html>