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