Re: [csswg-drafts] [css-values] Type conversion functions (#6408)

You can't directly convert lengths to numbers. If `1em = 16px`, it doesn't make sense for `1em` and `16px` to be converted to different things, and for `1em` and `1px` to be converted to the same number since one length is larger than the other. And what number does `calc(1px + 1em)` get converted into? It just doesn't make sense.

See [Why does hypot() allow dimensions (values with units), but pow() and sqrt() only work on numbers?](https://drafts.csswg.org/css-values-4/#exponent-funcs) in the spec.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6408#issuecomment-2325460480 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 3 September 2024 01:52:37 UTC