]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
When using .[size]-unstack classes in flex grid, only style immediate child columns...
authorGeoff Kimball <geoff@zurb.com>
Mon, 14 Mar 2016 18:59:38 +0000 (11:59 -0700)
committerGeoff Kimball <geoff@zurb.com>
Mon, 14 Mar 2016 18:59:38 +0000 (11:59 -0700)
scss/grid/_flex-grid.scss
test/visual/flex-grid/unstack-block-grid.html [new file with mode: 0644]

index 788313311e7f5edfdc0596fe96ef153492d6fabc..7333eb1f7bda4573ff19481d87db9c6a14723f4f 100644 (file)
       // Auto-stacking/unstacking
       @at-root (without: media) {
         .row.#{$-zf-size}-unstack {
-          .column {
+          .column {
             flex: flex-grid-column(100%);
 
             @include breakpoint($-zf-size) {
diff --git a/test/visual/flex-grid/unstack-block-grid.html b/test/visual/flex-grid/unstack-block-grid.html
new file mode 100644 (file)
index 0000000..dfcf913
--- /dev/null
@@ -0,0 +1,49 @@
+<!doctype html>
+<!--[if IE 9]><html class="lt-ie10" lang="en" > <![endif]-->
+<html class="no-js" lang="en" dir="ltr">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <title>Foundation for Sites Testing</title>
+    <link href="../assets/css/foundation-flex.css" rel="stylesheet" />
+    <style>
+      .column .column {
+        background: #eee;
+      }
+      .column .column .column {
+        background: #ddd;
+      }
+    </style>
+  </head>
+  <body>
+    <div class="row">
+      <div class="column">
+        <h1>Flex Grid: Unstack and Block Grid</h1>
+
+        <p>The top-level row has the class <code>.medium-unstack</code>, which means child columns stack on small, and sit side-by-side on medium screens and up.</p>
+
+        <p>The nested row has the class <code>.up-3</code>, which means its columns are 33% width no matter the screen size.</p>
+
+        <p>These two features should not interact. The two top-level columns always stack on small, and the three nested columns always stay the exact same percentage width.</p>
+
+        <div class="row medium-unstack">
+          <div class="column">
+            <strong>Column One</strong>
+            <div class="row up-3">
+              <div class="column">Block Grid Column One</div>
+              <div class="column">Block Grid Column Two</div>
+              <div class="column">Block Grid Column Three</div>
+            </div>
+          </div>
+          <div class="column"><strong>Column Two</strong></div>
+        </div>
+      </div>
+    </div>
+
+    <script src="../assets/js/vendor.js"></script>
+    <script src="../assets/js/foundation.js"></script>
+    <script>
+      $(document).foundation();
+    </script>
+  </body>
+</html>