diff options
| author | Mark Otto <[email protected]> | 2016-02-06 00:47:40 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2016-02-06 00:47:40 -0800 |
| commit | cac92017d3d9fcfc4641379fc0350318efbb6059 (patch) | |
| tree | 5b3d6afcb7a690139a09395b135471ba9de9f170 | |
| parent | e149a6035ef5689040d619ac7301f802b1dc8167 (diff) | |
| parent | 29dcf9ac623c5ae13bd3d582b9e0b369ba7a3cc6 (diff) | |
| download | bootstrap-cac92017d3d9fcfc4641379fc0350318efbb6059.tar.xz bootstrap-cac92017d3d9fcfc4641379fc0350318efbb6059.zip | |
Merge branch 'v4-dev' into v4-grid-redux
| -rw-r--r-- | docs/_includes/nav-docs.html | 1 | ||||
| -rw-r--r-- | docs/layout/grid.md | 27 | ||||
| -rw-r--r-- | scss/.scss-lint.yml | 12 |
3 files changed, 29 insertions, 11 deletions
diff --git a/docs/_includes/nav-docs.html b/docs/_includes/nav-docs.html index fa2984188..b4f4d1f9e 100644 --- a/docs/_includes/nav-docs.html +++ b/docs/_includes/nav-docs.html @@ -25,6 +25,7 @@ <ul class="nav bd-sidenav"> {% for doc in group.pages %} {% assign slug = doc.title | downcase | replace: ' ', '-' | replace:'-&-','-' %} + {% capture slug %}/{{ slug }}{% endcapture %} {% assign active = nil %} {% if page.url contains slug %} diff --git a/docs/layout/grid.md b/docs/layout/grid.md index 029fcdfe2..547284635 100644 --- a/docs/layout/grid.md +++ b/docs/layout/grid.md @@ -164,23 +164,40 @@ Mixins are used in conjunction with the grid variables to generate semantic CSS {% highlight scss %} // Creates a wrapper for a series of columns @mixin make-row($gutter: $grid-gutter-width) { + @if $enable-flex { + display: flex; + flex-wrap: wrap; + } @else { + @include clearfix(); + } margin-left: ($gutter / -2); margin-right: ($gutter / -2); - @include clearfix(); } // Make the element grid-ready (applying everything but the width) @mixin make-col($gutter: $grid-gutter-width) { position: relative; - float: left; + @if $enable-flex { + flex: 1; + } @else { + float: left; + } min-height: 1px; padding-left: ($gutter / 2); padding-right: ($gutter / 2); } -// Set a width (to be used in or out of media queries) -@mixin make-col-span($columns) { - width: percentage(($columns / $grid-columns)); +@mixin make-col-span($size, $columns: $grid-columns) { + // Set a width (to be used in or out of media queries) + @if $enable-flex { + flex: 0 0 percentage($size / $columns); + // Add a `max-width` to ensure content within each column does not blow out + // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari + // do not appear to require this. + max-width: percentage($size / $columns); + } @else { + width: percentage($size / $columns); + } } // Get fancy by offsetting, or changing the sort order diff --git a/scss/.scss-lint.yml b/scss/.scss-lint.yml index b736c3699..f93f30d37 100644 --- a/scss/.scss-lint.yml +++ b/scss/.scss-lint.yml @@ -106,6 +106,12 @@ linters: "-moz-box-sizing", "box-sizing", "display", + "flex", + "flex-direction", + "flex-flow", + "flex-order", + "flex-pack", + "flex-align", "float", "width", "min-width", @@ -113,12 +119,6 @@ linters: "height", "min-height", "max-height", - "flex", - "flex-direction", - "flex-flow", - "flex-order", - "flex-pack", - "flex-align", "padding", "padding-top", "padding-right", |
