]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
document how to customize grid tiers
authorMark Otto <markdotto@gmail.com>
Sat, 6 Feb 2016 21:02:42 +0000 (13:02 -0800)
committerMark Otto <markdotto@gmail.com>
Sat, 6 Feb 2016 21:02:42 +0000 (13:02 -0800)
docs/layout/grid.md

index d43f6e8abbd813c965e51bd6ade885c973d9546c..3a76a651b6846eaae6122e1739ab2122db9ae7aa 100644 (file)
@@ -452,3 +452,25 @@ Easily change the order of our built-in grid columns with `.col-md-push-*` and `
 </div>
 {% endexample %}
 </div>
+
+## Customizing the grid
+
+Using our built-in grid Sass variables and maps, it's possible to completely customize the predefined grid classes. Change the number of tiers, the media query dimensions, and the container widths—then recompile.
+
+For example, if you wanted just three grid tiers, you'd update the `$grid-breakpoints` and `$container-max-widths` to something like this:
+
+{% highlight scss %}
+$grid-breakpoints: (
+  sm: 480px,
+  md: 768px,
+  lg: 1024px
+);
+
+$container-max-widths: (
+  sm: 420px,
+  md: 720px,
+  lg: 940px
+) !default;
+{% endhighlight %}
+
+Save your changes and recompile to have a brand new set of predefined grid classes for column widths, offsets, pushes, and pulls. Responsive visibility utilities will also be updated to use the custom breakpoints.