]> 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>
Tue, 25 Jul 2017 00:06:58 +0000 (17:06 -0700)
Added docs on block grid!

docs/pages/xy-grid.md

index 863bddd75a4aa2bcb10fa25aac74d8b64cf97726..5d8c020545c4f653c277f16c3a625dce06124ac5 100644 (file)
@@ -203,6 +203,29 @@ 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.