Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not generate invalid xy-cell when breakpoint is not found #10821

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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