From: Geoff Kimball Date: Wed, 2 Mar 2016 19:41:17 +0000 (-0800) Subject: Emit a warning instead of an error if a non-existant breakpoint is used in the breakp... X-Git-Tag: v6.2.1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58e204e752e311648bc6a5df1e81d951820f541f;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Emit a warning instead of an error if a non-existant breakpoint is used in the breakpoint() function, and provide a fallback --- diff --git a/scss/util/_breakpoint.scss b/scss/util/_breakpoint.scss index 5418d9973..688301f4c 100644 --- a/scss/util/_breakpoint.scss +++ b/scss/util/_breakpoint.scss @@ -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.'; } } diff --git a/test/sass/_breakpoint.scss b/test/sass/_breakpoint.scss index f525c9158..d013ac47d 100755 --- a/test/sass/_breakpoint.scss +++ b/test/sass/_breakpoint.scss @@ -93,6 +93,10 @@ '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,