grid-lanes-intrinsic-sizing-rows-003-mix2-ref.html (3237B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <!-- WARNING: The interaction of writing-mode and min-content sizing seems to be a bit hazy. It's not clear if this is a correct reference. --> 7 <html> 8 <meta charset="utf-8"> 9 <title>Reference: Grid Lanes layout min-content sizing</title> 10 <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com"> 11 <style> 12 13 @import "support/grid-lanes-intrinsic-sizing-visual.css"; 14 15 grid { 16 display: inline-grid; 17 gap: 1px 2px; 18 /* keep fixed values small enough for spanners to have an effect */ 19 grid-template-rows: 1.1ch auto 1.4ch 1fr; 20 grid-auto-flow: column; 21 border: 1px solid; 22 padding: 1px 0 2px 0; 23 vertical-align: top; 24 height: min-content; 25 } 26 27 item { 28 justify-self: start; 29 writing-mode: vertical-rl; 30 text-orientation: sideways; 31 } 32 .hidden { 33 visibility: hidden; 34 width: 0; 35 } 36 </style> 37 38 <body> 39 40 <section> 41 <grid> 42 <item style="height:2ch">1</item> 43 <item style="grid-column: span 2">2 2</item> 44 <item style="grid-column: span 2">3 3</item> 45 <item>4</item> 46 <item>5 5</item> 47 48 <item class="hidden" style="grid-area: 4/2">0 0</item> 49 </grid> 50 51 <grid> 52 <item>1</item> 53 <item style="grid-column: span 2">2 2</item> 54 <item style="grid-column: span 2">3 3</item> 55 <item>4</item> 56 <item style="height: 2ch">5 5</item> 57 58 <item class="hidden" style="grid-area: 4/2">0 0</item> 59 </grid> 60 61 <grid> 62 <item>1</item> 63 <item>2 2</item> 64 <item style="grid-column: span 2">3 3</item> 65 <item>4</item> 66 <item style="height:2ch; grid-row:2">5 5</item> 67 68 <item class="hidden" style="grid-area: 4/2">0 0</item> 69 </grid> 70 71 <grid> 72 <item>1</item> 73 <item>2 2</item> 74 <item>3 3</item> 75 <item>4</item> 76 <item style="height:4ch; grid-row:2/span 2">5 5</item> 77 78 <item class="hidden" style="grid-area: 4/2">0 0</item> 79 </grid> 80 81 <grid> 82 <item>1</item> 83 <item>2 2</item> 84 <item>3 3</item> 85 <item>4</item> 86 <item style="grid-row:2/span 2">5 5</item> 87 <item style="height:5ch; grid-row:1/span 3">6</item> 88 89 <item class="hidden" style="grid-area: 4/2">0 0</item> 90 </grid> 91 92 <grid> 93 <item>1</item> 94 <item>2 2</item> 95 <item>3 3</item> 96 <item>4</item> 97 <item style="height:3ch; grid-row:2/span 2">5 5</item> 98 <item style="height:5ch; grid-row:1/span 3">6</item> 99 100 <item class="hidden" style="grid-area: 4/2">0 0</item> 101 </grid> 102 103 <grid> 104 <item>1</item> 105 <item style="grid-column: span 2">2 2</item> 106 <item style="grid-column: span 2">3 3</item> 107 <item>4</item> 108 <item style="grid-area: 1/3/5/4">5 5</item> 109 110 <item class="hidden" style="grid-area: 4/3">0 0</item> 111 </grid> 112 113 <grid> 114 <item>1</item> 115 <item style="grid-column: span 2">2 2</item> 116 <item style="grid-column: span 2">3 3</item> 117 <item>4</item> 118 <item style="height:6ch; grid-area: 1/3/5/4">5 5</item> 119 120 <item class="hidden" style="grid-area: 4/3">0 0</item> 121 </grid> 122 123 <grid> 124 <item>1</item> 125 <item style="grid-column: span 2">2 2</item> 126 <item style="grid-column: span 2">3 3</item> 127 <item>4</item> 128 <item style="height:6ch; grid-area: 1/3/4/4">5 5</item> 129 130 <item class="hidden" style="grid-area: 4/3">0 0</item> 131 <item class="hidden" style="height:6ch; grid-area: 2/3/5/4">0 0</item> 132 </grid> 133 </section> 134 </body>