| <!DOCTYPE html> |
| <html> |
| <script src="../../resources/check-layout.js"></script> |
| <link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel="stylesheet"> |
| <link href="resources/grid.css" rel="stylesheet"> |
| <style> |
| .grid { |
| grid-template-rows: auto auto; |
| grid-template-columns: auto auto; |
| } |
| |
| .gridItem { |
| width: 20px; |
| height: 40px; |
| } |
| |
| .marginTop { |
| margin-top: 20px; |
| } |
| |
| .marginBottom { |
| margin-bottom: 20px; |
| } |
| |
| .borderTop { |
| border-top: 5px solid; |
| } |
| |
| .borderBottom { |
| border-bottom: 5px solid; |
| } |
| |
| .paddingTop { |
| padding-top: 10px; |
| } |
| |
| .paddingBottom { |
| padding-bottom: 10px; |
| } |
| </style> |
| </head> |
| <body onload="checkLayout('.grid')"> |
| |
| <div>This test checks that the grid's rows and columns 'auto' sizes are updated accordingly to its grid-item's before and start margins.</div> |
| |
| <div> |
| <div class="grid fit-content" data-expected-width="40" data-expected-height="120"> |
| <div class="gridItem marginTop firstRowFirstColumn"></div> |
| <div class="gridItem firstRowSecondColumn"></div> |
| <div class="gridItem marginBottom secondRowFirstColumn"></div> |
| <div class="gridItem secondRowSecondColumn"></div> |
| </div> |
| </div> |
| |
| <div> |
| <div class="grid fit-content" data-expected-width="40" data-expected-height="120"> |
| <div class="gridItem marginTop paddingTop firstRowFirstColumn"></div> |
| <div class="gridItem firstRowSecondColumn"></div> |
| <div class="gridItem borderTop borderBottom secondRowFirstColumn"></div> |
| <div class="gridItem secondRowSecondColumn"></div> |
| </div> |
| </div> |
| |
| <div> |
| <div class="grid fit-content" data-expected-width="40" data-expected-height="120"> |
| <div class="gridItem marginTop paddingTop firstRowFirstColumn"></div> |
| <div class="gridItem firstRowSecondColumn"></div> |
| <div class="gridItem borderTop borderBottom secondRowFirstColumn"></div> |
| <div class="gridItem secondRowSecondColumn"></div> |
| </div> |
| </div> |
| |
| <div> |
| <div class="grid fit-content" data-expected-width="40" data-expected-height="120"> |
| <div class="gridItem marginTop paddingTop firstRowFirstColumn"></div> |
| <div class="gridItem firstRowSecondColumn"></div> |
| <div class="gridItem paddingBottom secondRowFirstColumn"></div> |
| <div class="gridItem secondRowSecondColumn"></div> |
| </div> |
| </div> |
| |
| </body> |
| </html> |