]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: new varable to control build warnings
authorJoe Workman <joe@workmanmail.com>
Mon, 27 Sep 2021 16:37:39 +0000 (09:37 -0700)
committerJoe Workman <joe@workmanmail.com>
Mon, 27 Sep 2021 16:37:39 +0000 (09:37 -0700)
This will suppress warnings when css custom props are passes instead of a number value

scss/util/_unit.scss

index e1bd81a0fd1aa71e431b98e16d789c497994b293..75e0b13ab25824d405f2df85c182f9dbd085c163 100644 (file)
@@ -4,6 +4,8 @@
 
 @import 'math';
 
+$unit-warnings: true !default;
+
 ////
 /// @group functions
 ////
@@ -77,7 +79,9 @@ $global-font-size: 100% !default;
 @function -zf-to-rem($value, $base: null) {
   // Check if the value is a number
   @if type-of($value) != 'number' {
-    @warn inspect($value) + ' was passed to rem-calc(), which is not a number.';
+    @if $unit-warnings {
+      @warn inspect($value) + ' was passed to rem-calc(), which is not a number.';
+    }
     @return $value;
   }