]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Output errors if $breakpoints doesn't have a small or medium breakpoint, or if small...
authorGeoff Kimball <geoff@zurb.com>
Wed, 23 Dec 2015 21:23:41 +0000 (13:23 -0800)
committerGeoff Kimball <geoff@zurb.com>
Wed, 23 Dec 2015 21:23:44 +0000 (13:23 -0800)
scss/util/_breakpoint.scss

index 4235ae42f0374ca2cf86d8b61f986e1fb4205c9a..0daa07a6094de9067e778f518d0625a29cb86029 100644 (file)
@@ -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;