@mixin icon-style($style: "regular", $position: "before") {
  $position: "::" + $position;
  &#{$position} {
    @if $style == "brands" {
      font-family: "font-awesome-brands";
      font-weight: $font-weight-icon-brands;
    }
    @else if $style == "custom" {
      font-family: "font-awesome-custom";
      font-weight: $font-weight-icon-custom;
    }
    @else if $style == "regular" or $style == "solid" {
      font-family: "font-awesome";
      @if $style == "solid" {
        font-weight: $font-weight-icon-solid;
      }
      @else {
        font-weight: $font-weight-icon-default;
      }
    }
    @else {
      @error "No icon style named \"#{$style}\"";
    }
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    text-rendering: auto;

    @content;
  }
}

@mixin set-icon($icon, $include-pseudo: false) {
  @if map-has-key($icons, $icon) {
    $char: map-get($icons, $icon);
    $char-string: #{'"\\' + $char + '";'};
    @if $include-pseudo == false {
      content:  #{$char-string};
    }
    @else if $include-pseudo == "before" {
      &::before {
        content:  #{$char-string};
      }
    }
    @else if $include-pseudo {
      &::after {
        content:  #{$char-string};
      }
    }
    @else {
      @error "$include-pseudo paramenter must be either \"before\", \"after\" or false (default)";
    }

  }
  @else {
    @error "No icon named #{$icon} in $icons map."
  }
}
