Upgrade to ExtJS 4.0.1 - Released 05/18/2011
[extjs.git] / docs / resources / themes / stylesheets / ext4 / default / _functions.scss
1 @function min($value1, $value2) {
2     @if $value1 > $value2 {
3         @return $value2;
4     }
5     @else if $value2 > $value1 {
6         @return $value1;
7     }
8     @return $value1;
9 }
10
11 @function max($value1, $value2) {
12     @if $value1 > $value2 {
13         @return $value1;
14     }
15     @else if $value2 > $value1 {
16         @return $value2;
17     }
18     @return $value1;
19 }
20
21 @function top($box) {
22     @return parsebox($box, 1);
23 }
24 @function right($box) {
25     @return parsebox($box, 2);
26 }
27 @function bottom($box) {
28     @return parsebox($box, 3);
29 }
30 @function left($box) {
31     @return parsebox($box, 4);
32 }
33 @function vertical($box) {
34     @return top($box) + bottom($box);
35 }
36 @function horizontal($box) {
37     @return left($box) + right($box);
38 }
39 @function boxmax($box) {
40     @return max(max(top($box), right($box)), max(bottom($box), left($box)));
41 }
42 @function boxmin($box) {
43     @return min(min(top($box), right($box)), min(bottom($box), left($box)));
44 }