aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorNick <[email protected]>2016-09-13 07:31:05 +0200
committerMark Otto <[email protected]>2016-09-12 22:31:05 -0700
commit3f01134031b15a934d5e233bb26a407a7e05492b (patch)
tree06b7d43631b3aedf1995355e6d9884d26984733e /docs
parent089bc85a494ba18c954c86c83ecc30a2506516a7 (diff)
downloadbootstrap-3f01134031b15a934d5e233bb26a407a7e05492b.tar.xz
bootstrap-3f01134031b15a934d5e233bb26a407a7e05492b.zip
Grid mixins docs should match source code (#20705)
Diffstat (limited to 'docs')
-rw-r--r--docs/layout/grid.md18
1 files changed, 10 insertions, 8 deletions
diff --git a/docs/layout/grid.md b/docs/layout/grid.md
index 7114da4b7..5b68053aa 100644
--- a/docs/layout/grid.md
+++ b/docs/layout/grid.md
@@ -180,7 +180,7 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS
}
// Make the element grid-ready (applying everything but the width)
-@mixin make-col-ready($size, $columns: $grid-columns, $gutter: $grid-gutter-width) {
+@mixin make-col-ready($gutter: $grid-gutter-width) {
position: relative;
min-height: 1px; // Prevent collapsing
padding-right: ($gutter / 2);
@@ -194,7 +194,7 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS
}
}
-@mixin make-col($size, $columns: $grid-columns, $gutter: $grid-gutter-width) {
+@mixin make-col($size, $columns: $grid-columns) {
@if $enable-flex {
flex: 0 0 percentage($size / $columns);
// Add a `max-width` to ensure content within each column does not blow out
@@ -208,14 +208,16 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS
}
// Get fancy by offsetting, or changing the sort order
-@mixin make-col-offset($columns) {
- margin-left: percentage(($columns / $grid-columns));
+@mixin make-col-offset($size, $columns: $grid-columns) {
+ margin-left: percentage($size / $columns);
}
-@mixin make-col-push($columns) {
- left: percentage(($columns / $grid-columns));
+
+@mixin make-col-push($size, $columns: $grid-columns) {
+ left: if($size > 0, percentage($size / $columns), auto);
}
-@mixin make-col-pull($columns) {
- right: percentage(($columns / $grid-columns));
+
+@mixin make-col-pull($size, $columns: $grid-columns) {
+ right: if($size > 0, percentage($size / $columns), auto);
}
{% endhighlight %}