@mixin button-size($size) {
  $n: 0;
  @if $size == xlarge {
    $n: $xlarge-button-font-size;
  }
  @if $size == large {
    $n: $large-button-font-size;
  }
  @if $size == medium {
    $n: $medium-button-font-size;
  }
  @if $size == small {
    $n: $small-button-font-size;
  }
  $button-font-size: $n;
  $button-height: ms($ratio, $button-font-size) + 1;
  $line-height: $button-height - 2;

  @include font-size($button-font-size);
  @include line-and-height($button-height);

  a {
    position:relative;
    padding: 0 ms(0, $button-font-size);
  }

  &.icon-left {
    a {
      padding-left: $button-height;
      &:before {
        left: $button-font-size / 1.5;
      }
    }
  }

  &.icon-right {
    a {
      padding-right: $button-height;
      &:after {
        right: $button-font-size / 1.5;
      }
    }
  }
}
