grid-max-sizing-flex-003.html (2009B)
1 <!DOCTYPE HTML> 2 <!-- 3 Any copyright is dedicated to the Public Domain. 4 http://creativecommons.org/publicdomain/zero/1.0/ 5 --> 6 <html><head> 7 <meta charset="utf-8"> 8 <title>CSS Grid Test: Testing track flex max-sizing</title> 9 <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1151212"> 10 <link rel="help" href="http://dev.w3.org/csswg/css-grid/#algo-flex-tracks"> 11 <link rel="match" href="grid-max-sizing-flex-003-ref.html"> 12 <style type="text/css"> 13 body,html { color:black; background:white; font-size:8px; line-height:10px; padding:0; margin:0; } 14 15 body { width: 800px; } 16 .grid { 17 display: grid; 18 grid-auto-rows: minmax(0,1fr); 19 border: 3px dashed blue; 20 justify-items: stretch; 21 justify-content: start; 22 align-content: start; 23 } 24 25 .c1 { grid-row: 1 / span 2; min-height:40px; } 26 .r1 { grid-row: 2 / span 3; min-height:70px; } 27 .c3 { grid-row: 3 / span 1; min-height:0; } 28 29 span { 30 background: gray; 31 border-style: solid; 32 border-height: 1px 3px 5px 7px; 33 padding: 1px 3px; 34 margin: 1px 5px; 35 } 36 37 x { display:inline-block; height:10px; width:18px; } 38 </style> 39 </head> 40 <body> 41 42 <div class="grid"> 43 <span class="c1"><x></x></span> 44 <span class="r1"><x></x></span> 45 </div> 46 47 <div class="grid"> 48 <span class="c1"><x></x></span> 49 <span class="r1"><x></x></span> 50 <span class="c3"><x></x></span> 51 </div> 52 53 <div class="grid"> 54 <span class="c1"><x></x></span> 55 <span class="r1"><x></x></span> 56 <span class="r1"><x></x></span> 57 <span class="r1"><x></x></span> 58 </div> 59 60 <div class="grid" style="height:100px;"> 61 <span class="c1" style="min-height:20px"><x></x></span> 62 <span class="r1" style="min-height:10px"><x></x></span> 63 <span class="r1" style="min-height:30px"><x></x></span> 64 <span class="r1" style="min-height:10px"><x></x></span> 65 </div> 66 67 <div class="grid"> 68 <span class="c1" style="height:30px; border-sizing:border-box"><x></x></span> 69 <span class="r1" style="height:40px; border-sizing:border-box"><x></x></span> 70 <span class="c3"><x></x></span> 71 </div> 72 73 </body> 74 </html>