forked from mirrors/gecko-dev
		
	 2ad41e8ac9
			
		
	
	
		2ad41e8ac9
		
	
	
	
	
		
			
			Automatic update from web-platform-tests [css-grid] Migrate grid-item-margin-auto-columns-rows to WPT Migrate this test out of third_party/blink/web_tests/fast/css-grid-layout/ into the WPT-specific directory, adding links to the relevant specs and a test assertion describing its purpose. Bug: 1063749, 767015 Change-Id: I0cb225a60fae7ae40746307983a795cdbfdd35f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2148779 Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com> Reviewed-by: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Manuel Rego <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#759198} -- wpt-commits: 00a2ae6a11b01d386c05cef3fe6b636587c81d58 wpt-pr: 22923
		
			
				
	
	
		
			87 lines
		
	
	
	
		
			2.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			87 lines
		
	
	
	
		
			2.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html>
 | |
| <title>CSS Grid: 'auto' sizes with item's margins</title>
 | |
| <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com">
 | |
| <link rel="help" href="https://drafts.csswg.org/css-grid">
 | |
| <link rel="help" href="https://drafts.csswg.org/css-grid/#layout-algorithm">
 | |
| <link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=357419">
 | |
| <meta name="assert" content="Check that the grid's rows and columns 'auto' sizes are updated accordingly to its grid-item's before and start margins."/>
 | |
| <link href="/css/support/grid.css" rel="stylesheet">
 | |
| <link href="/css/support/width-keyword-classes.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>
 | |
| 
 | |
| <script src="/resources/testharness.js"></script>
 | |
| <script src="/resources/testharnessreport.js"></script>
 | |
| <script src="/resources/check-layout-th.js"></script>
 | |
| 
 | |
| <body onload="checkLayout('.grid')">
 | |
| <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>
 |