From: Nicolas Coden Date: Sun, 24 Dec 2017 13:31:49 +0000 (+0100) Subject: fix: do not generate invalid xy-cell when breakpoint is not found X-Git-Tag: v6.6.0~3^2~322^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0f8eaef549c58b7537522d6dea07c63d3665a1b;p=thirdparty%2Ffoundation%2Ffoundation-sites.git fix: do not generate invalid xy-cell when breakpoint is not found --- diff --git a/scss/xy-grid/_cell.scss b/scss/xy-grid/_cell.scss index 79cb3d713..c2c1c7bb2 100644 --- a/scss/xy-grid/_cell.scss +++ b/scss/xy-grid/_cell.scss @@ -120,21 +120,26 @@ } } - // Get our gutters from map if available, if not map just return the value. + // Get the gutter for the passed breakpoint/value. $gutter: -zf-get-bp-val($gutters, $breakpoint); - // Base flex properties - @include xy-cell-base($size); + @if($gutter != null) { + // Base flex properties + @include xy-cell-base($size); - @if($gutter-type == 'margin') { - @include -xy-cell-properties($size, $gutter, $vertical); + @if($gutter-type == 'margin') { + @include -xy-cell-properties($size, $gutter, $vertical); + } + @else { + @include -xy-cell-properties($size, 0, $vertical); + } + + @if $gutter-output { + @include xy-gutters($gutter, $gutter-type, $gutter-position); + } } @else { - @include -xy-cell-properties($size, 0, $vertical); - } - - @if $gutter-output { - @include xy-gutters($gutter, $gutter-type, $gutter-position); + @warn 'xy-cell: no gutters were found in `$gutters` for "$breakpoint: #{$breakpoint}", cell was not generated`' } }