Skip to content

Commit

Permalink
fix: do not generate invalid xy-cell when breakpoint is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoden committed Dec 24, 2017
1 parent a8ad968 commit e0f8eae
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions scss/xy-grid/_cell.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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`'
}
}

Expand Down

0 comments on commit e0f8eae

Please sign in to comment.