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

Side by Side Diff: LayoutTests/fast/css-grid-layout/relayout-justify-self-changed.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 <style>
4 .grid {
5 grid: 150px / 100px 100px;
6 width: 150px;
7 position: relative;
8 }
9 .fromStretch { justify-self: stretch; }
10 .toStretch { justify-self: end; }
11 </style>
12 <script src="../../resources/check-layout.js"></script>
13 <p>Tests how a justify-self style change requires a relayout of the grid and pre viously stretched items.</p>
14 <p>The grid bellow had initially 'justify-self: end' and was changed to 'stretch '.</p>
15 <div class="grid">
16 <div style="height: 50px;" class="toStretch firstRowFirstColumn" data-expect ed-width="150" data-offset-x="0">
17 <div style="width: 50px;"></div>
18 </div>
19 <div style="height: 50px;" class="toStretch secondRowFirstColumn" data-expec ted-width="150" data-offset-x="0">
20 <div style="width: 100px;"></div>
21 </div>
22 </div>
23 <p>The grid bellow was initially stretched and it has now 'justify-self: center' .</p>
24 <div class="grid">
25 <div style="height: 50px;" class="fromStretch firstRowFirstColumn" data-expe cted-width="50" data-offset-x="50">
26 <div style="width: 50px;"></div>
27 </div>
28 <div style="height: 50px;" class="fromStretch secondRowFirstColumn" data-exp ected-width="100" data-offset-x="25">
29 <div style="width: 100px;"></div>
30 </div>
31 </div>
32 <script>
33 document.body.offsetLeft;
34 document.getElementsByClassName('toStretch')[0].style.justifySelf = 'stretch';
35 document.getElementsByClassName('toStretch')[1].style.justifySelf = 'stretch';
36 document.getElementsByClassName('fromStretch')[0].style.justifySelf = 'center';
37 document.getElementsByClassName('fromStretch')[1].style.justifySelf = 'center';
38 checkLayout(".grid");
39 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698