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 typo #10491

Merged
merged 4 commits into from
Aug 1, 2017
Merged

Fix typo #10491

Show file tree
Hide file tree
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
14 changes: 11 additions & 3 deletions scss/util/_breakpoint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@ $breakpoint-classes: (small medium large) !default;
$bp: index($-zf-breakpoints-keys, $value);
$pbp: index($-zf-breakpoints-keys, $print-breakpoint);

$old-zf-size: null;

// Make breakpoint size available as a variable
$old-zf-size: $-zf-zero-breakpoint;
@if global-variable-exists(-zf-size) {
$old-zf-size: $-zf-size;
}
$-zf-size: nth($value, 1) !global; // get the first value to account for `only` and `down` keywords

// If $str is still an empty string, no media query is needed
Expand All @@ -168,8 +172,12 @@ $breakpoint-classes: (small medium large) !default;
}
}

// Restore the old breakpoint size
$-zf-size: $old-zf-size !global;
@if $old-zf-size != null {
// Restore the old breakpoint size
$-zf-size: $old-zf-size !global;
} @else {
$-zf-size: null !global;
}
}

/// Convers the breakpoints map to a URL-encoded string, like this: `key1=value1&key2=value2`. The value is then dropped into the CSS for a special `<meta>` tag, which is read by the Foundation JavaScript. This is how we transfer values from Sass to JavaScript, so they can be defined in one place.
Expand Down
2 changes: 1 addition & 1 deletion scss/xy-grid/_cell.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
) {
@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') {
@if(variable-exists(-zf-size) and type-of($-zf-size) != 'number') and $-zf-size != null {
$breakpoint: $-zf-size;
}
@else {
Expand Down