grid-lanes-intrinsic-sizing-rows-003-mix1.html (3059B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html> 7 <meta charset="utf-8"> 8 <title>CSS Grid Test: Grid Lanes layout column sizing - min-content</title> 9 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> 10 <link rel="help" href="https://drafts.csswg.org/css-grid-3/#track-sizing"> 11 <link rel="match" href="grid-lanes-intrinsic-sizing-rows-003-mix1-ref.html"> 12 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> 13 <style> 14 15 @import "support/grid-lanes-intrinsic-sizing-visual.css"; 16 17 grid { 18 display: inline-grid-lanes; 19 grid-lanes-direction: row; 20 gap: 1px 2px; 21 grid-template-rows: 1fr 2fr min-content max-content; 22 border: 1px solid; 23 padding: 1px 0 2px 0; 24 vertical-align: top; 25 height: min-content; 26 font-family: Ahem; 27 } 28 29 item { 30 /* allow for differing min-content and max-content sizes */ 31 writing-mode: vertical-rl; 32 text-orientation: sideways; 33 } 34 35 grid > item:nth-child(1) { 36 background-color: #89CFF0; 37 } 38 39 grid > item:nth-child(2) { 40 background-color: #FF6F61; 41 } 42 43 grid > item:nth-child(3) { 44 background-color: #FDF3E7; 45 } 46 47 grid > item:nth-child(4) { 48 background-color: #F4C542; 49 } 50 51 grid > item:nth-child(5) { 52 background-color: #333333; 53 } 54 55 grid > item:nth-child(6) { 56 background-color: #B2C8A5; 57 } 58 </style> 59 60 <body> 61 62 <section class="mix1"> 63 <grid title="Wider 1st item 2ch"> 64 <item style="height:2ch">1</item> 65 <item>2 2</item> 66 <item>3 3</item> 67 <item>4</item> 68 <item>5 5</item> 69 </grid> 70 71 <grid title="Wrapped 5th item 2ch"> 72 <item>1</item> 73 <item>2 2</item> 74 <item>3 3</item> 75 <item>4</item> 76 <item style="height:2ch">5 5</item> 77 </grid> 78 79 <grid title="Wrapped 5th item 2ch in col 2"> 80 <item>1</item> 81 <item>2 2</item> 82 <item>3 3</item> 83 <item>4</item> 84 <item style="height:2ch; grid-row:2">5 5</item> 85 </grid> 86 87 <grid title="5th item 4ch in col 2-3"> 88 <item>1</item> 89 <item>2 2</item> 90 <item>3 3</item> 91 <item>4</item> 92 <item style="height:4ch; grid-row:2/span 2">5 5</item> 93 </grid> 94 95 <grid title="5th item in col 2-3, 6th item 5ch in col 1-3"> 96 <item>1</item> 97 <item>2 2</item> 98 <item>3 3</item> 99 <item>4</item> 100 <item style="grid-row:2/span 2">5 5</item> 101 <item style="height:5ch; grid-row:span 3/4">6</item> 102 </grid> 103 104 <grid title="5th item 3ch in col 2-3, 6th item 5ch in col 1-3"> 105 <item>1</item> 106 <item>2 2</item> 107 <item>3 3</item> 108 <item>4</item> 109 <item style="height:3ch; grid-row:span 2/4">5</item> 110 <item style="height:5ch; grid-row:1/span 3">6</item> 111 </grid> 112 113 <grid title="5th item span 4"> 114 <item>1</item> 115 <item>2 2</item> 116 <item>3 3</item> 117 <item>4</item> 118 <item style="grid-row:span 4">5 5</item> 119 </grid> 120 121 <grid title="5th item 6ch span 4"> 122 <item>1</item> 123 <item>2 2</item> 124 <item>3 3</item> 125 <item>4</item> 126 <item style="height:6ch; grid-row:span 4">5 5</item> 127 </grid> 128 129 <grid title="5th item 6ch span 3"> 130 <item>1</item> 131 <item>2 2</item> 132 <item>3 3</item> 133 <item>4</item> 134 <item style="height:6ch; grid-row:span 3">5 5</item> 135 </grid> 136 </section> 137 </body>