Calculate min / max of two values in Less
问题 How do i get the maximum or minimum of two values in Less. Just like Math.min() or Math.max() in javascript. I think this will be useful to use in your mixins. 回答1: This feature has been implemented in the meantime. Have a look at the official Function Reference: min() max() 回答2: Less min/max builtin functions are planned for future releases, see: https://github.com/less/less.js/pull/1371. For now you could try, based on https://stackoverflow.com/a/15982103/1596547: .max(@a,@b) { @max: ~"@{b