Re: [csswg-drafts] [css-values-4] What should non-calc() math functions serialize to when they're fully resolved? (#4399)

Sorry, this is off topic, but how does *the simplification process for calculation trees will crunch things down to* `calc(1px)` for `min(1px, 2px)`?

> Math functions are turned into calculation trees depending on the function: 
> - [...] 
> - any other math function [than `calc()`]: the internal representation is an operator node with the same name as the function, whose children are the result of parsing a calculation from each of the function’s arguments, in the order they appear.

`1px` and `2px` are the calculations of `min`, but `min` nevers goes through:

> If `root` is an operator node that’s not one of the calc-operator nodes, and all of its calculation children are numeric values with enough information to compute the operation root represents, return the result of running root’s operation using its children, expressed in the result’s canonical unit.

I already opened (and closes a few minutes later) another issue probably because of the same thing(s) confusing me.

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


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

Received on Monday, 8 November 2021 14:39:57 UTC