]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Use pull request #11300 from ncoden/fix/xy-cell-gutter-fallback-11194 for v6.5.0
authorNicolas Coden <nicolas@ncoden.fr>
Sat, 16 Jun 2018 08:17:05 +0000 (10:17 +0200)
committerNicolas Coden <nicolas@ncoden.fr>
Sat, 16 Jun 2018 21:02:24 +0000 (23:02 +0200)
2e021171d fix: use fallback gutter for fallback breakpoint in XY cell #11194

Signed-off-by: Nicolas Coden <nicolas@ncoden.fr>
scss/xy-grid/_cell.scss

index 34eb3dce2343a68612cac89c4027517cc6b5dc13..e20e8a11292eb02e2d5b845458eb8a3754ac1a98 100644 (file)
   $breakpoint: null,
   $vertical: false
 ) {
+  $bp-is-fallback: false;
+
   @if($breakpoint == null) {
     // If `$bp-size` is available then use this, otherwise revert to the smallest bp.
     @if(variable-exists(-zf-size) and type-of($-zf-size) != 'number') and $-zf-size != null {
     }
     @else {
       $breakpoint: $-zf-zero-breakpoint;
+      $bp-is-fallback: true;
     }
   }
 
-  // Get the gutter for the passed breakpoint/value.
+  // Get the gutter for the given breakpoint/value.
   $gutter: -zf-get-bp-val($gutters, $breakpoint);
+  // If the breakpoint is a fallback, use a fallback gutter as well
+  @if ($bp-is-fallback == true and $gutter == null) {
+    $gutter: 0;
+  }
 
   @if($gutter != null) {
     // Base flex properties