<commit_before>// _svg.scss
//
// @package bitaculous/assetify/assets/images

// === Functions ===

@function svg-icon-properties($icon) {
  @return map-get($svg-sprite-icons, $icon);
}

@function svg-icon-property($icon, $property) {
  @if map-has_key($svg-sprite-icons, $icon) == false {
    @warn "Icon `#{$icon}` does not exist.";

    @return false;
  }

  @return map-get(svg-icon-properties($icon), $property);
}

// === Mixins ===

// --- Public ---

@mixin svg-icon($icon, $position: relative, $top: 0, $right: auto, $bottom: 0, $left: 0, $margin: auto, $padding: true, $gap: 10, $pseudo: before) {
  position: $position;

  &::#{$pseudo} {
    @include svg-icon-base($icon);

    bottom: $bottom;
    content: '';
    display: block;
    left: $left;
    margin: $margin;
    position: absolute;
    right: $right;
    top: $top;
  }

  @if $padding {
    $icon-width: svg-icon-property($icon, width);

    @if $icon-width {
      $overall-width-in-px: ($icon-width + $gap) * 1px;

      @if $pseudo == after {
        padding-right: rem($overall-width-in-px);
      } @else {
        padding-left: rem($overall-width-in-px);
      }
    }
  }
}

@mixin svg-icon-inline($icon, $position: static, $vertical-align: middle, $margin: null, $pseudo: before) {
  &::#{$pseudo} {
    @include svg-icon-base($icon);

    content: '';
    display: inline-block;
    vertical-align: $vertical-align;

    @if $position != static {
      position: $position;
    }

    @if $margin != null {
      margin: $margin;
    }
  }
}

@mixin svg-icon-change($icon, $height: false, $width: false, $position: null, $top: null, $right: null, $bottom: null, $left: null, $margin: null, $pseudo: before) {
  @if $position != null {
    position: $position;
  }

  &::#{$pseudo} {
    @include svg-icon-background-position($icon);

    @if $height {
      @include svg-icon-height($icon);
    }

    @if $width {
      @include svg-icon-width($icon);
    }

    @if $top != null {
      top: $top;
    }

    @if $right != null {
      right: $right;
    }

    @if $bottom != null {
      bottom: $bottom;
    }

    @if $left != null {
      left: $left;
    }

    @if $margin != null {
      margin: $margin;
    }
  }
}

@mixin svg-icon-replace($icon, $height: false, $width: false, $pseudo: before) {
  &::#{$pseudo} {
    @include svg-icon-background-position($icon);

    @if $height {
      @include svg-icon-height($icon);
    }

    @if $width {
      @include svg-icon-width($icon);
    }
  }
}

@mixin svg-icon-position($top: 0, $right: auto, $bottom: 0, $left: 0, $pseudo: before) {
  &::#{$pseudo} {<commit_msg>[➠] Added alias mixin.<commit_after>// _svg.scss
//
// @package bitaculous/assetify/assets/images

// === Functions ===

@function svg-icon-properties($icon) {
  @return map-get($svg-sprite-icons, $icon);
}

@function svg-icon-property($icon, $property) {
  @if map-has_key($svg-sprite-icons, $icon) == false {
    @warn "Icon `#{$icon}` does not exist.";

    @return false;
  }

  @return map-get(svg-icon-properties($icon), $property);
}

// === Mixins ===

// --- Public ---

@mixin svg-icon($icon, $position: relative, $top: 0, $right: auto, $bottom: 0, $left: 0, $margin: auto, $padding: true, $gap: 10, $pseudo: before) {
  position: $position;

  &::#{$pseudo} {
    @include svg-icon-base($icon);

    bottom: $bottom;
    content: '';
    display: block;
    left: $left;
    margin: $margin;
    position: absolute;
    right: $right;
    top: $top;
  }

  @if $padding {
    $icon-width: svg-icon-property($icon, width);

    @if $icon-width {
      $overall-width-in-px: ($icon-width + $gap) * 1px;

      @if $pseudo == after {
        padding-right: rem($overall-width-in-px);
      } @else {
        padding-left: rem($overall-width-in-px);
      }
    }
  }
}

@mixin svg-icon-inline($icon, $position: static, $vertical-align: middle, $margin: null, $pseudo: before) {
  &::#{$pseudo} {
    @include svg-icon-base($icon);

    content: '';
    display: inline-block;
    vertical-align: $vertical-align;

    @if $position != static {
      position: $position;
    }

    @if $margin != null {
      margin: $margin;
    }
  }
}

@mixin svg-icon-change($icon, $height: false, $width: false, $position: null, $top: null, $right: null, $bottom: null, $left: null, $margin: null, $pseudo: before) {
  @if $position != null {
    position: $position;
  }

  &::#{$pseudo} {
    @include svg-icon-background-position($icon);

    @if $height {
      @include svg-icon-height($icon);
    }

    @if $width {
      @include svg-icon-width($icon);
    }

    @if $top != null {
      top: $top;
    }

    @if $right != null {
      right: $right;
    }

    @if $bottom != null {
      bottom: $bottom;
    }

    @if $left != null {
      left: $left;
    }

    @if $margin != null {
      margin: $margin;
    }
  }
}

@mixin svg-icon-update($icon, $height: false, $width: false, $position: null, $top: null, $right: null, $bottom: null, $left: null, $margin: null, $pseudo: before) {
  @include svg-icon-change(icon: $icon, height: $height, width: $width, position: $position, top: $top, right: $right, bottom: $bottom, left: $left, margin: $margin, pseudo: $pseudo);
}

@mixin svg-icon-replace($icon, $height: false, $width: false, $pseudo: before) {
  &::#{$pseudo} {
    @include svg-icon-background-position($icon);

    @if $height {
      @include svg-icon-height($icon);
    }

    @if $width {
      @include svg-icon-width($icon);
    }
  }
}

@mixin svg-icon-position($top: 0, $right: auto, $bottom: 0, $left: 0, $pseudo: before) {
  &::#{$pseudo} {
{'fraction_non_alphanumeric': 0.19871106337271752, 'fraction_numerical': 0.00322234156820623, 'mean_word_length': 2.757229320780094, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '980002', 'n_tokens_mistral': 2129, 'n_tokens_neox': 2052, 'n_words': 462}