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

So, for “locks”,

``` css
selector {
  property: /* $min_value ≤ */ $fallback_value /* ≤ $max_value = 
$min_value + $max_increment */;
}
@media (min-width: $min_vw) and (max-width: $max_vw) {
  selector {
    property: calc( $min_value + $max_increment *   (100vw - $min_vw) 
                //*                               ———————————————————
  */
                                                  ($max_vw - $min_vw)
  );
  }
}
@media (max-width: $min_vw) {
  selector {
    property: calc( $min_value + 0 );
  }
}
@media (min-width: $max_vw) {
  selector {
    property: calc( $min_value + $max_increment /* = $max_value */ );
  }
}
```

would become

``` css
selector {
  property: /* $min_value ≤ */ $fallback_value /* ≤ $max_value = 
$min_value + $max_increment */;
  property: calc( $min_value + $max_increment * min(  (100vw - 
$min_vw) 
              //*                                   
———————————————————     */
                                                    ($max_vw - 
$min_vw), 1) );
}
```

right?

I wonder if authors would also find good use for `mid()`dle/`avg()`, 
`med()`ian, `mod()`e etc.

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

Received on Tuesday, 4 October 2016 11:38:41 UTC