W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2018

Re: [csswg-drafts] [css-values] Re-adding min() and max()?

From: Eric Willigers via GitHub <sysbot+gh@w3.org>
Date: Sun, 28 Jan 2018 23:18:31 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-361105760-1517181509-sysbot+gh@w3.org>
There are implementation implications. Currently, implementations can internally reduce any calc to an array of coefficients. (Element dimensions, font size, device orientation might change during an animation, so a calc can't simply be represented as a number of pixels.)

This proposal requires a slow path of general expression evaluation during each frame's style calculation. 

Suppose we have animation between `min(10%, 20vw)` and `max(30em, 40vh)`.

At 75% progress, the result is
`calc(0.75 * min(10%, 20vw) + 0.25 * max(30em, 40vh))`


-- 
GitHub Notification of comment by ewilligers
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/544#issuecomment-361105760 using your GitHub account
Received on Sunday, 28 January 2018 23:18:34 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:23 UTC