From: Nicolas Coden Date: Fri, 13 Jul 2018 21:53:47 +0000 (+0200) Subject: feat: add `none` gutter type to xy-cell mixin X-Git-Tag: v6.6.0~3^2~68^2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a07051333a2b178e5623922fbb78e7e2d2e8e84e;p=thirdparty%2Ffoundation%2Ffoundation-sites.git feat: add `none` gutter type to xy-cell mixin 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, --- diff --git a/scss/xy-grid/_cell.scss b/scss/xy-grid/_cell.scss index 32ae17c71..5ebadc10c 100644 --- a/scss/xy-grid/_cell.scss +++ b/scss/xy-grid/_cell.scss @@ -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. @@ -143,7 +143,7 @@ $-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); } } diff --git a/scss/xy-grid/_layout.scss b/scss/xy-grid/_layout.scss index bdc958783..02c63a2ae 100644 --- a/scss/xy-grid/_layout.scss +++ b/scss/xy-grid/_layout.scss @@ -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.