]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Update breakpoint mixin to store the `$-zf-size` value, so we can grab it when using...
authorBrett Mason <brettsmason@gmail.com>
Sun, 28 May 2017 11:17:32 +0000 (12:17 +0100)
committerBrett Mason <brettsmason@gmail.com>
Sun, 28 May 2017 11:17:32 +0000 (12:17 +0100)
scss/util/_breakpoint.scss

index a2f8ab2bd23c53a0db090aa495953db964378552..efe0ff084649876cbdd8024267b1bfc9e2140b74 100644 (file)
@@ -144,6 +144,10 @@ $breakpoint-classes: (small medium large) !default;
   $bp: index($-zf-breakpoints-keys, $value);
   $pbp: index($-zf-breakpoints-keys, $print-breakpoint);
 
+  // Make breakpoint size available as a variable
+  $old-zf-size: $-zf-zero-breakpoint;
+  $-zf-size: $value !global;
+
   // If $str is still an empty string, no media query is needed
   @if $str == '' {
     @content;
@@ -163,6 +167,9 @@ $breakpoint-classes: (small medium large) !default;
       }
     }
   }
+
+  // Restore the old breakpoint size
+  $-zf-size: $old-zf-size !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.