3 ms·
There’s nothing to fix, basic or otherwise. Safari is following the specification. There’s even a clarifying note about exactly this: > Because <number-token>s
by chrisoverzero 4y ago
There’s nothing to fix, basic or otherwise. Safari is following the specification. There’s even a clarifying note about exactly this:
> 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 https://www.w3.org/TR/css-values-4/#calc-type-checking
(This also appears in the latest Editor’s Draft.)
- rado 4y agoIn my case, that zero comes from a variable, which changes depending on context. I'm not trying to break the browser or be funny. It works fine in Chrome.