1@mixin button-size($size) {
2  $n: 0;
3  @if $size == xlarge {
4    $n: $xlarge-button-font-size;
5  }
6  @if $size == large {
7    $n: $large-button-font-size;
8  }
9  @if $size == medium {
10    $n: $medium-button-font-size;
11  }
12  @if $size == small {
13    $n: $small-button-font-size;
14  }
15  $button-font-size: $n;
16  $button-height: ms($ratio, $button-font-size) + 1;
17  $line-height: $button-height - 2;
18
19  @include font-size($button-font-size);
20  @include line-and-height($button-height);
21
22  a {
23    position:relative;
24    padding: 0 ms(0, $button-font-size);
25  }
26
27  &.icon-left {
28    a {
29      padding-left: $button-height;
30      &:before {
31        left: $button-font-size / 1.5;
32      }
33    }
34  }
35
36  &.icon-right {
37    a {
38      padding-right: $button-height;
39      &:after {
40        right: $button-font-size / 1.5;
41      }
42    }
43  }
44}
45