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

Unified Diff: third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-item-dynamic-change.html

Issue 2471283004: [css-grid] Fix simplified layout of positioned grid items (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-item-dynamic-change.html
diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-item-dynamic-change.html b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-item-dynamic-change.html
new file mode 100644
index 0000000000000000000000000000000000000000..53f7ec769d9a2d2d04f7c34a1a41c3db493027bf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-item-dynamic-change.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<style>
+
+.grid {
+ display: grid;
+ grid: 50px 50px / 50px 50px;
+ position: relative;
+}
+
+.green {
+ background: green;
+}
+
+.red {
+ background: red;
+}
+
+#item {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ grid-column: 1 / 2;
+ grid-row: 1 / 2;
+}
+</style>
+
+<p>This test checks that positioned items can be dynamically changed.</p>
+<p>The test passes if you see a 100x100 green square and no red.</p>
+
+<div class="grid">
+ <div class="green"></div>
+ <div class="green"></div>
+ <div class="green"></div>
+ <div class="red"></div>
+ <div id="item" class="green"></div>
+</div>
+
+<script>
+document.body.offsetLeft;
+
+var item = document.getElementById("item");
+item.style.gridColumn = "2 / 3";
+item.style.gridRow = "2 / 3";
+
+checkLayout(".grid");
+</script>

Powered by Google App Engine
This is Rietveld 408576698