mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-17 19:06:40 +02:00
Grid mixins docs should match source code (#20705)
This commit is contained in:
@@ -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)
|
// 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;
|
position: relative;
|
||||||
min-height: 1px; // Prevent collapsing
|
min-height: 1px; // Prevent collapsing
|
||||||
padding-right: ($gutter / 2);
|
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 {
|
@if $enable-flex {
|
||||||
flex: 0 0 percentage($size / $columns);
|
flex: 0 0 percentage($size / $columns);
|
||||||
// Add a `max-width` to ensure content within each column does not blow out
|
// 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
|
// Get fancy by offsetting, or changing the sort order
|
||||||
@mixin make-col-offset($columns) {
|
@mixin make-col-offset($size, $columns: $grid-columns) {
|
||||||
margin-left: percentage(($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 %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user