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: use fallback gutter for fallback breakpoint in XY cell #11194 #11300

Merged
merged 1 commit into from
May 28, 2018
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
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