Skip to content

Commit

Permalink
Merge pull request #11300 from ncoden/fix/xy-cell-gutter-fallback-11194
Browse files Browse the repository at this point in the history
fix: use fallback gutter for fallback breakpoint in XY cell #11194
  • Loading branch information
ncoden authored May 28, 2018
2 parents 3caaaac + 2e02117 commit d4de5d8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scss/xy-grid/_cell.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,25 @@
$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 {
$breakpoint: $-zf-size;
}
@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
Expand Down

0 comments on commit d4de5d8

Please sign in to comment.