Re: [csswg-drafts] [css-values] Add clamp()?

The default should absolutely be that the min wins over the max when they're in the wrong order; CSS uses this resolution method everywhere, because usually a minimum is important for accessibility, while a maximum is more for appearance.  That is, `clamp(min, mid, max)` is equivalent to `max(min, min(mid, max))`.

As I pointed out in the thread, it's not too hard to implement either of the other behaviors if you really want: if you want max to win, you can write `min(max, max(min, mid))`; if you want to swap them around, you write `clamp(min(min, max), mid, max(min, max))`. When custom functions arrive, both of those can be made ergonomic, too.

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

Received on Monday, 16 April 2018 22:10:55 UTC