//
// SVG Icon
//
@function valueif($check, $trueValue, $falseValue: null) {
  @if $check {
    @return $trueValue;
  } @else if $falseValue != null {
    @return $falseValue;
  } @else {
    @return null;
  }
}

@mixin svg-icon-color($color, $important: false) {
    svg {
      [fill]:not(.permanent):not(g) {
        transition: fill 0.3s ease;
        fill: $color valueif($important, !important, null);
      }

      &:hover {
        [fill]:not(.permanent):not(g) {
          transition: fill 0.3s ease;
        }
      }
    }
}

@mixin svg-icon-transition() {
  svg {
    [fill]:not(g) {
      transition: fill 0.3s ease;
    }
  }
}

@mixin svg-icon-size($size, $important: false) {
    svg {
        height: $size valueif($important, !important, null);
        width: $size valueif($important, !important, null);
    }
}

@mixin svg-logo-color($color, $important: false){
    svg{
        path{
            fill: $color valueif($important, !important, null);
        }
    }
}
