This will suppress warnings when css custom props are passes instead of a number value
@import 'math';
+$unit-warnings: true !default;
+
////
/// @group functions
////
@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;
}