]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Merge pull request #10357 from zurb/docs/add-block-grid
authorKevin Ball <kmball11@gmail.com>
Thu, 6 Jul 2017 18:00:13 +0000 (11:00 -0700)
committerKevin Ball <kmball11@gmail.com>
Thu, 6 Jul 2017 18:06:51 +0000 (11:06 -0700)
Added docs on block grid!

docs/pages/xy-grid.md

index 0760941878b972c1fc53f364bf3025802adfa02b..b9f7a594eddca2f67d1d09224fc4843b8510f623 100644 (file)
@@ -208,6 +208,35 @@ Offsets work by applying `margin-left` (or `margin-top` for a vertical grid) to
 
 ---
 
+## Block Grids
+
+To define cell widths within a direction-level, instead of the individual cell level, add the class `.[size]-up-[n]` to a `grid-x` or `grid-y`, where `[n]` is the number of cells to display per direction, and `[size]` is the breakpoint at which to apply the effect.
+
+<div class="primary callout">This example uses padding grid but this can be used with margin grid too.</div>
+
+<div class="docs-codepen-container">
+<a class="codepen-logo-link" href="https://codepen.io/IamManchanda/pen/PjBLxE?editors=1000" target="_blank"><img src="{{root}}assets/img/logos/edit-in-browser.svg" class="" height="" width="" alt="edit on codepen button"></a>
+</div>
+
+```html_example
+<div class="grid-x grid-padding-x small-up-2 medium-up-4 large-up-6">
+  <div class="cell">cell</div>
+  <div class="cell">cell</div>
+  <div class="cell">cell</div>
+  <div class="cell">cell</div>
+  <div class="cell">cell</div>
+  <div class="cell">cell</div>
+</div>
+```
+
+---
+
+## Looking for Push Pull
+
+Push and pull are a bit of a hack solution and was only necessary for Float based grids. But for flexbox, this hack is not needed as [source ordering](flexbox-utilities.html#source-ordering) does this with ease.
+
+---
+
 ## Vertical Grids
 
 The XY grid also supports vertical grids. Simply apply `.grid-y` instead of `.grid-x`.