 Chromium Code Reviews
 Chromium Code Reviews Issue 1228983003:
  [CSS Grid Layout] Do not stretch always grid items with auto width  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 1228983003:
  [CSS Grid Layout] Do not stretch always grid items with auto width  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| Index: LayoutTests/fast/css-grid-layout/relayout-align-self-changed.html | 
| diff --git a/LayoutTests/fast/css-grid-layout/relayout-align-self-changed.html b/LayoutTests/fast/css-grid-layout/relayout-align-self-changed.html | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..f2bd2c79440fb854d5f55251ed2ae3ae053b70ca | 
| --- /dev/null | 
| +++ b/LayoutTests/fast/css-grid-layout/relayout-align-self-changed.html | 
| @@ -0,0 +1,39 @@ | 
| +<!DOCTYPE HTML> | 
| +<link href="resources/grid.css" rel="stylesheet"> | 
| +<style> | 
| +.grid { | 
| + grid: 100px 100px / 150px; | 
| + width: 200px; | 
| 
svillar
2015/07/10 14:00:52
Do we really need width: here?
 
jfernandez
2015/07/10 15:07:24
See my comments above.
 | 
| + position: relative; | 
| +} | 
| +.toStretch { align-self: end; } | 
| +.fromStretch { align-self: stretch; } | 
| +</style> | 
| +<script src="../../resources/check-layout.js"></script> | 
| +<p style="height: 20px">Tests how a align-self style change requires a relayout of the grid and previously stretched items.</p> | 
| 
svillar
2015/07/10 14:00:52
Why height on <p> element?
 
jfernandez
2015/07/10 15:07:24
Done.
 | 
| +<p>The grid bellow had initially 'align-self: end' and was changed to 'stretch'.</p> | 
| +<div class="grid"> | 
| + <div style="width: 50px;" class="toStretch firstRowFirstColumn" data-expected-height="150" data-offset-y="0"> | 
| 
svillar
2015/07/10 14:00:52
Is it possible to set the width in its child as we
 
jfernandez
2015/07/10 15:07:24
See my comments above.
 | 
| + <div style="height: 50px"></div> | 
| + </div> | 
| + <div style="width: 50px;" class="toStretch firstRowSecondColumn" data-expected-height="150" data-offset-y="0"> | 
| + <div style="height: 100px"></div> | 
| + </div> | 
| +</div> | 
| +<p>The grid bellow was initially stretched and it has now 'align-self: center'.</p> | 
| +<div class="grid"> | 
| + <div style="width: 50px;" class="fromStretch firstRowFirstColumn" data-expected-height="50" data-offset-y="50"> | 
| + <div style="height: 50px"></div> | 
| + </div> | 
| + <div style="width: 50px;" class="fromStretch firstRowSecondColumn" data-expected-height="100" data-offset-y="25"> | 
| + <div style="height: 100px"></div> | 
| + </div> | 
| +</div> | 
| +<script> | 
| +document.body.offsetLeft; | 
| +document.getElementsByClassName('toStretch')[0].style.alignSelf = 'stretch'; | 
| +document.getElementsByClassName('toStretch')[1].style.alignSelf = 'stretch'; | 
| +document.getElementsByClassName('fromStretch')[0].style.alignSelf = 'center'; | 
| +document.getElementsByClassName('fromStretch')[1].style.alignSelf = 'center'; | 
| +checkLayout(".grid"); | 
| +</script> |