- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Sat, 12 Aug 2017 23:18:40 +0000
- To: public-css-archive@w3.org
I do agree that `clamp()`, while technically superfluous, is useful often enough that it probably deserves to exist. (We use it a lot in the specs, after all!) It also gives you a consistent answer to which wins if the two aren't in proper order, min or max - we'd match standard CSS practice and have min win. (If you want max to win, you can manually write a nested min()/max() expression with max() on the outside.) I also agree that the argument order `(min, mid, max)` is best here, rather than `(mid, min, max)` - it matches what I use in JS too. ^_^ Finally, it avoids the significant confusion (at least, that I experience) when using min()/max() directly, where you have to put the *upper* value in the *min()* function, and the *lower* value in the max(). That is, you implement a min-* effect by using the max() function, and vice versa. This always confuses me! `clamp()` avoids that when you need both ends, and if this issue confuses you in general, you can just always use `clamp()`, especially if we explicitly allow `infinity` as a max argument (and `-infinity` as a min). -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/544#issuecomment-322011769 using your GitHub account
Received on Saturday, 12 August 2017 23:18:41 UTC