flexbox-single-row-vertical-rl-1c.html (3474B)
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 row flex container with block-size:auto 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-row-vertical-rl-1-ref.html"> 11 <meta name="assert" content="This test verifies fragmentation of block-size:auto flex items in a block-size:auto single-line row flex container, with various combinations of margin/border/padding, alignments, and column-gap."> 12 13 <style> 14 html { 15 writing-mode: vertical-rl; 16 } 17 .multicol { 18 block-size: 50px; 19 inline-size: 320px; 20 column-count: 3; 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: row; 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, nav, article, footer { 41 flex-grow: 1; 42 } 43 header { 44 background: cyan; 45 } 46 header > div { 47 block-size: 100px; 48 } 49 nav { 50 background: magenta; 51 align-self: flex-start; 52 } 53 nav > div { 54 block-size: 25px; 55 } 56 article { 57 background: yellow; 58 align-self: center; 59 } 60 article > div { 61 block-size: 50px; 62 } 63 footer { 64 background: black; 65 align-self: flex-end; 66 } 67 footer > div { 68 block-size: 75px; 69 } 70 </style> 71 72 <body> 73 <!-- Basic one without any margin/border/padding. --> 74 <div class="multicol"> 75 <div class="flexContainer"> 76 <header><div></div></header><nav><div></div></nav> 77 <article><div></div></article><footer><div></div></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><div></div></header><nav><div></div></nav> 85 <article><div></div></article><footer><div></div></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><div></div></header><nav><div></div></nav> 94 <article><div></div></article><footer><div></div></footer> 95 </div> 96 </div> 97 98 <!-- Test a container with border and padding. --> 99 <div class="multicol"> 100 <div class="flexContainer border-padding"> 101 <header><div></div></header><nav><div></div></nav> 102 <article><div></div></article><footer><div></div></footer> 103 </div> 104 </div> 105 106 <!-- Test a container with border, padding, and column-gap. --> 107 <div class="multicol"> 108 <div class="flexContainer border-padding" style="column-gap: 4px"> 109 <header><div></div></header><nav><div></div></nav> 110 <article><div></div></article><footer><div></div></footer> 111 </div> 112 </div> 113 </body> 114 </html>