Skip to content

Commit 2f84122

Browse files
committed
Update breakpoint mixin to store the $-zf-size value, so we can grab it when using the mixin.
1 parent 70da211 commit 2f84122

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scss/util/_breakpoint.scss

+7
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ $breakpoint-classes: (small medium large) !default;
144144
$bp: index($-zf-breakpoints-keys, $value);
145145
$pbp: index($-zf-breakpoints-keys, $print-breakpoint);
146146

147+
// Make breakpoint size available as a variable
148+
$old-zf-size: $-zf-zero-breakpoint;
149+
$-zf-size: $value !global;
150+
147151
// If $str is still an empty string, no media query is needed
148152
@if $str == '' {
149153
@content;
@@ -163,6 +167,9 @@ $breakpoint-classes: (small medium large) !default;
163167
}
164168
}
165169
}
170+
171+
// Restore the old breakpoint size
172+
$-zf-size: $old-zf-size !global;
166173
}
167174

168175
/// 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.

0 commit comments

Comments
 (0)