Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Side by Side Diff: LayoutTests/fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-margin-change.html

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
Patch Set: Applied suggested changes. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <link href="resources/grid.css" rel="stylesheet">
3 <script src="../../resources/check-layout.js"></script>
4 <style>
5 .grid {
6 grid-template: 200px 200px / 200px 200px;
7 width: -webkit-fit-content;
8 position: relative;
9 }
10 #fromFixedHeight { height: 100px; }
11 #fromMarginAuto { margin: auto; }
12 </style>
13 <p>The grids below had initially 'stretched' items, but we have changed 'height' and 'margin' to values which don't allow stretch. This test verifies that the l ayout algorithm properly detects such changes and clear the override height acco rdingly.</p>
14 <div class="grid">
15 <div id="toFixedHeight" class="firstRowFirstColumn" data-expected-height="10 0"></div>
16 <div class="firstRowSecondColumn" data-expected-height="200"></div>
17 <div class="secondRowFirstColumn" data-expected-height="200"></div>
18 <div id="fromFixedHeight" class="secondRowSecondColumn" data-expected-height ="200"></div>
19 </div>
20 <div class="grid">
21 <div id="toMarginAuto" class="firstRowFirstColumn" data-expected-height="100 ">
22 <div style="height: 100px"></div>
23 </div>
24 <div class="firstRowSecondColumn" data-expected-height="200"></div>
25 <div class="secondRowFirstColumn" data-expected-height="200"></div>
26 <div id="fromMarginAuto" class="secondRowSecondColumn" data-expected-height= "200">
27 <div style="height: 100px"></div>
28 </div>
29 </div>
30 <script>
31 document.body.offsetLeft;
32 document.getElementById("fromFixedHeight").style.height = "auto";
33 document.getElementById("toFixedHeight").style.height = "100px";
34 document.getElementById("fromMarginAuto").style.margin = "0";
35 document.getElementById("toMarginAuto").style.margin = "auto";
36 checkLayout(".grid");
37 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698