Re: [csswg-drafts] [css-values-4] Should arguments to min/max get simplified when only partial simplification is possible? (#4756)

I don't remember all the details from #4399 but it's talking about "fully resolved" expressions.

In your example I'm assuming that we haven't resolved `em` yet. Otherwise, if e.g. we know `1em = 10px`, then `max(10em, 10px, 20em)` is simplified to `calc(200px)`.

So if we don't know what's the value of `10em` and `20em`, then I don't think we should try to simplify `max(10em, 10px, 20em)`.

Sums can do partial simplifications but I would special-case them since they are an operator. But I would treat functions as black boxes until we have resolved all their arguments and can call them. They may very well be black boxes once we let authors define their own custom functions with JS.

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

Received on Friday, 7 February 2020 15:15:22 UTC