// 文字描边
@mixin vci-font-stroke($color: #333) {
  text-shadow: 1px 0 1px $color, -1px 0 1px $color, 0 -1px 1px $color,
    0 1px 1px $color;
}

/**
  线性渐变文字
  $angle: 渐变角度:0~360deg;
  $color: 默认字体颜色，用于不支持渐变文字的情况下;
  $colors: 颜色数组例如: (#ccc, #ccc, #ccc) 或者 (#ccc 10%, #ccc 50%, #ccc)
 */
@mixin vci-font-linear-gradient($angle, $color, $colors) {
  $lg-colors: null;
  @for $idx from 1 to length($colors) + 1 {
    /* stylelint-disable */
    $lg-colors: append($lg-colors, nth($colors, $idx));
    /* stylelint-enable */
  }

  display: inline-block;
  padding-right: 10px !important;
  color: $color;
  /* stylelint-disable */
  background: linear-gradient($angle, join($lg-colors, (), comma));
  /* stylelint-enable */
  -webkit-background-clip: text; /* stylelint-disable-line */
  -webkit-text-fill-color: transparent;
}

/**
  文字选中背景
  $bg  选中背景 默认: #1a74be
  $color  选中文字颜色 默认: #fff
 */
@mixin vci-font-selection($bg: #1a74be, $color: #fff) {
  &::selection {
    color: $color;
    background: $bg;
  }
}
