]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add $gutter parameter to grid-row() and flex-grid-row() mixins, closes #7115
authorGeoff Kimball <geoff@zurb.com>
Fri, 18 Dec 2015 18:29:33 +0000 (10:29 -0800)
committerGeoff Kimball <geoff@zurb.com>
Fri, 18 Dec 2015 18:29:35 +0000 (10:29 -0800)
scss/grid/_flex-grid.scss
scss/grid/_row.scss

index f83fd4f388df094918557f5fef12490c65c2daa8..ebe2413091f14a529ff4cf7eaf6496dee9d1b1b0 100644 (file)
 /// @param {Number} $width [$grid-row-width] - Maximum width of the row.
 /// @param {Number} $columns [null] - Number of columns to use for this row. If set to `null` (the default), the global column count will be used.
 /// @param {Boolean} $base [true] - Set to `false` to prevent basic styles from being output. Useful if you're calling this mixin on the same element twice, as it prevents duplicate CSS output.
+/// @param {Number} $gutter [$grid-column-gutter] - Gutter to use when inverting margins, in case the row is nested.
 @mixin flex-grid-row(
   $behavior: null,
   $width: $grid-row-width,
   $columns: null,
-  $base: true
+  $base: true,
+  $gutter: $grid-column-gutter
 ) {
   $behavior: -zf-get-options($behavior, nest collapse);
   $margin: auto;
 
   @if map-get($behavior, nest) {
-    $margin: rem-calc($grid-column-gutter) / 2 * -1;
+    $margin: rem-calc($gutter) / 2 * -1;
   }
   @else {
     max-width: $width;
index 3f0aa3bf2f8c987214f69ba0414cea22f0ffa3d7..cf007e30b6fc0ac7c5ad61daaa06c655fcdb03cc 100644 (file)
 ///   Modifications to the default grid styles. `nest` indicates the row will be placed inside another row. `collapse` indicates that the columns inside this row will not have padding. `nest collapse` combines both behaviors.
 /// @param {Number} $width [$grid-row-width] - Maximum width of the row.
 /// @param {Boolean} $cf [true] - Whether or not to include a clearfix.
+/// @param {Number} $gutter [$grid-column-gutter] - Gutter to use when inverting margins, in case the row is nested.
 @mixin grid-row(
   $columns: null,
   $behavior: null,
   $width: $grid-row-width,
-  $cf: true
+  $cf: true,
+  $gutter: $grid-column-gutter
 ) {
   $behavior: -zf-get-options($behavior, nest collapse);
   $margin: auto;
 
   @if map-get($behavior, nest) {
-    $margin: rem-calc($grid-column-gutter) / 2 * -1;
+    $margin: rem-calc($gutter) / 2 * -1;
 
     @if map-get($behavior, collapse) {
       $margin: 0;