Re: [csswg-drafts] [css-values-4] How should atan2 behave with different length units? (#7482)

> That is one interpretation.

Are you referring to the resolved value I expect for `atan2(1cm, 1mm)`? I could walk through and quote the steps in the spec to get to this result but it is best to let a CSSWG member answers you, yes.

Regarding `<percentage>` in `atan2()` to replace a value that should match `<angle>`, I believe that [resolving the type of the function](https://drafts.csswg.org/css-values-4/#calc-type-checking) will fail:

> `<percentage>`: if, in the context in which the math function containing this calculation is placed, `<percentage>`s are resolved relative to another type of value (such as in width, where `<percentage>` is resolved against a `<length>`), and that other type is not `<number>`, the type is determined as the other type. Otherwise, the type is `«[ "percent" → 1 ]»`.
>
> [...]
>
> For each of the above, if the type is failure, the math function is invalid.

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


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

Received on Sunday, 10 July 2022 16:41:07 UTC