From: Geoff Kimball Date: Wed, 23 Dec 2015 21:23:41 +0000 (-0800) Subject: Output errors if $breakpoints doesn't have a small or medium breakpoint, or if small... X-Git-Tag: v6.2.0-rc.1~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce1836415ecde6aa4a9a2bc4445f0d360d2a845b;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Output errors if $breakpoints doesn't have a small or medium breakpoint, or if small is not 0, closes #7644 --- diff --git a/scss/util/_breakpoint.scss b/scss/util/_breakpoint.scss index 4235ae42f..0daa07a60 100644 --- a/scss/util/_breakpoint.scss +++ b/scss/util/_breakpoint.scss @@ -18,6 +18,13 @@ $breakpoints: ( xxlarge: 1440px, ) !default; +@if not map-has-key($breakpoints, small) or not map-has-key($breakpoints, medium) { + @error 'Your list of breakpoints (defined in $breakpoints) must include one named "small" and one named "medium".'; +} +@else if map-get($breakpoints, small) != 0 { + @error 'Your "small" breakpoint (defined in $breakpoints) must be set to "0".'; +} + /// All of the names in this list will be output as classes in your CSS, like `.small-12`, `.medium-6`, and so on. Each value in this list must also be in the `$breakpoints` map. /// @type List $breakpoint-classes: (small medium large) !default;