Had this issue on Safari only, not Chrome. I wish browsers would fix the basics before taking on ambitious new features.
> Because <number-token>s are always interpreted as <number>s or <integer>s, "unitless 0" <length>s aren’t supported in math functions. That is, width: calc(0 + 5px); is invalid, because it’s trying to add a <number> to a <length>, even though both width: 0; and width: 5px; are valid.
— https://www.w3.org/TR/css-values-4/#calc-type-checking
(This also appears in the latest Editor’s Draft.)
Note your preprocessor may be overly ambitious with stripping units, which I think is frankly a dumb linter rule always, but that’s not the browser’s fault.
IMHO the issue is that an exception for zero exists at all. Units should be required in all places.