]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
feat: add `none` gutter type to xy-cell mixin
authorNicolas Coden <nicolas@ncoden.fr>
Fri, 13 Jul 2018 21:53:47 +0000 (23:53 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Fri, 13 Jul 2018 21:53:47 +0000 (23:53 +0200)
This allow to explicitely generate a gutters-less cell, instead of a gutter "without gutters generated" or "with 0-width gutters".

This is a part of a bigger refactor of xy-cell and gutters usage,

scss/xy-grid/_cell.scss
scss/xy-grid/_layout.scss

index 32ae17c715bbcb386c6bdd5ccd036877f764f737..5ebadc10cc98b3b54ec38df0d8f2fee7a00ea1d1 100644 (file)
@@ -97,7 +97,7 @@
 /// @param {Keyword|Number} $size [full] - The size of your cell. Can be `full` (default) for 100% width, `auto` to use up available space and `shrink` to use up only required space.
 /// @param {Boolean} $gutter-output [true] - Whether or not to output gutters. Always `true` for margin gutters.
 /// @param {Number|Map} $gutters [$grid-margin-gutters] - Map or single value for gutters.
-/// @param {Keyword} $gutter-type [margin] - Type of gutter to output. Accepts `margin` or `padding`.
+/// @param {Keyword} $gutter-type [margin] - Type of gutter to output. Accepts `margin`, `padding` or `none`.
 /// @param {List} $gutter-position [null] - The position to apply gutters to. Accepts `top`, `bottom`, `left`, `right` in any combination. By default `right left` for horizontal cells and `top bottom` for vertical cells.
 /// @param {String} $breakpoint [null] - The name of the breakpoint size in your gutters map to get the size from. If using with the `breakpoint()` mixin this will be set automatically unless manually entered.
 /// @param {Boolean} $vertical [false] - Set to true to output vertical (height) styles rather than widths.
     $-gutter-margin: if($gutter-type == 'margin', $gutter, 0);
 
     @include -xy-cell-properties($size, $-gutter-margin, $vertical);
-    @if ($-gutter-output) {
+    @if ($gutter-output and $gutter-type and $gutter-type != none) {
       @include xy-gutters($gutter, $gutter-type, $gutter-position);
     }
   }
index bdc95878354466fbae37bdf42536839250bfa2d9..02c63a2aef2c875426592462deb8fdeda3583667 100644 (file)
@@ -12,7 +12,7 @@
 /// @param {String} $selector ['.cell'] - Selector(s) to use for child elements.
 /// @param {Boolean} $gutter-output [true] - Whether or not to output gutters. Always `true` for margin gutters.
 /// @param {Number|Map} $gutters [$grid-margin-gutters] - Map or single value for gutters.
-/// @param {Keyword} $gutter-type [margin] - Type of gutter to output. Accepts `margin` or `padding`.
+/// @param {Keyword} $gutter-type [margin] - Type of gutter to output. Accepts `margin`, `padding` or `none`.
 /// @param {List} $gutter-position [null] - The position to apply gutters to. Accepts `top`, `bottom`, `left`, `right` in any combination. By default `right left` for horizontal cells and `top bottom` for vertical cells.
 /// @param {String} $breakpoint [null] - The breakpoint to use for the cell generation.
 /// @param {Boolean} $vertical [false] - Set to true to output vertical (height) styles rather than widths.