]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Emit a warning instead of an error if a non-existant breakpoint is used in the breakp...
authorGeoff Kimball <geoff@zurb.com>
Wed, 2 Mar 2016 19:41:17 +0000 (11:41 -0800)
committerGeoff Kimball <geoff@zurb.com>
Wed, 2 Mar 2016 19:41:17 +0000 (11:41 -0800)
scss/util/_breakpoint.scss
test/sass/_breakpoint.scss

index 5418d99733c8bd906779e95bcf132463a4521a0e..688301f4c2c9cc3df0e7fc1e6cc2744d68573bb0 100644 (file)
@@ -63,7 +63,8 @@ $breakpoint-classes: (small medium large) !default;
       $named: true;
     }
     @else {
-      @error 'Your given breakpoint "#{$val}" is not defined in your settings $breakpoints.';
+      $bp: 0;
+      @warn 'breakpoint(): "#{$val}" is not defined in your $breakpoints setting.';
     }
   }
 
index f525c9158693f60752c505d220df1de7289579ae..d013ac47dfd84048f21bfd1ab161c261922567e2 100755 (executable)
       'Creates special media query for retina');
   }
 
+  @include test('Breakpoint (Unknown Value) [function]') {
+    @include assert-equal(breakpoint(xxxxlarge), '', 'Returns an empty string for non-existant media queries');
+  }
+
   @include test('Map Serialize [function]') {
     $input: (
       small: 1em,