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

Unified Diff: LayoutTests/fast/css-grid-layout/named-grid-areas-dynamic-with-media-query.html

Issue 680063005: [CSS Grid Layout] Redefining grids inside media queries does not work (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/css-grid-layout/named-grid-areas-dynamic-with-media-query.html
diff --git a/LayoutTests/fast/css-grid-layout/named-grid-areas-dynamic-with-media-query.html b/LayoutTests/fast/css-grid-layout/named-grid-areas-dynamic-with-media-query.html
new file mode 100644
index 0000000000000000000000000000000000000000..71074f2782fdf37174be735a7aa102cc9b17b7e6
--- /dev/null
+++ b/LayoutTests/fast/css-grid-layout/named-grid-areas-dynamic-with-media-query.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<style type="text/css">
+.grid {
+ display: grid;
+ grid-template-columns: 1fr;
+ grid-template-rows: auto;
+
+ grid-template-areas: "one"
+ "two"
+ "three";
+}
+
+.one {
+ grid-area: one;
+ background-color: beige;
+}
+
+.two {
+ grid-area: two;
+ background-color: antiquewhite;
+}
+
+.three {
+ grid-area: three;
+ background-color: bisque;
+}
+
+.one, .two, .three { min-height: 100px; }
+
+@media screen and (min-width: 500px) {
+ .grid {
+ grid-template-columns: 1fr 1fr;
+ grid-template-areas: "one one"
+ "two three";
+ }
+}
+
+@media screen and (min-width: 700px) {
+ .grid {
+ grid-template-columns: 2fr 1fr 1fr;
+ grid-template-areas: "one two three";
+ }
+}
+</style>
+</head>
+<body>
+<p>The test passes if you see 3 blocks bellow arranged on a single row</p>
+<div class="grid">
+ <div class="one"></div>
+ <div class="two"></div>
+ <div class="three"></div>
+</div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698