OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <meta charset="utf-8"> |
| 3 <title>CSS Grid Layout Test: Content Distribution 'stretch' and gaps with collap
sed tracks on 4x4 grid</title> |
| 4 <link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:jfernande
z@igalia.com"> |
| 5 <link rel="help" href="https://drafts.csswg.org/css-align-3/#content-distributio
n"> |
| 6 <link rel="help" href="https://drafts.csswg.org/css-grid/#collapsed-track"> |
| 7 <link rel="match" href="../../reference/ref-filled-green-300px-square.html"> |
| 8 <meta name="assert" content="Content Distribution alignment ignore collapsed gri
d tracks and render correctly with a value of 'stretch'."> |
| 9 <style> |
| 10 .block { |
| 11 position: absolute; |
| 12 z-index: -1; |
| 13 background: green; |
| 14 width: 300px; |
| 15 height: 300px; |
| 16 } |
| 17 .block > div { |
| 18 position: absolute; |
| 19 background: red; |
| 20 width: 60px; |
| 21 height: 60px; |
| 22 } |
| 23 .grid { |
| 24 z-index: 1; |
| 25 display: grid; |
| 26 width: 300px; |
| 27 height: 300px; |
| 28 grid-template-columns: repeat(auto-fit, minmax(25px, auto)); |
| 29 grid-template-rows: repeat(auto-fit, minmax(25px, auto)); |
| 30 grid-row-gap: 20px; |
| 31 grid-column-gap: 20px; |
| 32 align-content: stretch; |
| 33 justify-content: stretch; |
| 34 } |
| 35 .grid > div { background: green; } |
| 36 </style> |
| 37 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p
> |
| 38 <div class="block"> |
| 39 <div style="top: 0px; left: 80px;"></div> |
| 40 <div style="top: 0px; left: 160px;"></div> |
| 41 <div style="top: 80px; left: 160px;"></div> |
| 42 <div style="top: 160px; left: 160px;"></div> |
| 43 <div style="top: 240px; left: 0px;"></div> |
| 44 <div style="top: 240px; left: 240px;"></div> |
| 45 </div> |
| 46 <div class="grid"> |
| 47 <div class="item" style="grid-row: 1; grid-column: 2;"></div> |
| 48 <div class="item" style="grid-row: 1; grid-column: 5;"></div> |
| 49 <div class="item" style="grid-row: 3; grid-column: 5;"></div> |
| 50 <div class="item" style="grid-row: 4; grid-column: 5;"></div> |
| 51 <div class="item" style="grid-row: 6; grid-column: 1;"></div> |
| 52 <div class="item" style="grid-row: 6; grid-column: 7;"></div> |
| 53 </div> |
OLD | NEW |