@mixin axui-background($pos, $g1: null, $g2: null) {
  $pos-type: type-of(nth($pos, 1));

  // If $pos is missing from mixin, reassign vars and add default position
  @if ($pos-type == color) or (nth($pos, 1) == 'transparent') {
    $g2: $g1;
    $g1: $pos;
    $pos: to top;
  } @else if ($g1 == null) {
    $g1: $pos;
    $pos: to top;
  }

  // @debug($g1);
  @if (length($g1) == 2) {
    $g2: nth($g1, 2);
    $g1: nth($g1, 1);
  } @else if (length($g1) == 3) {
    $pos: nth($g1, 1);
    $g1: nth($g1, 2);
    $g2: nth($g1, 3);
  } @else {
    @if (type_of(nth($g2, 1)) == color) {
      $g2: nth($g2, 1);
    }
  }

  background-color: $g1;
  background-image: linear-gradient($pos, $g1, $g2);
}

@mixin axui-animation($animation: datagrid-spinner 0.6s linear infinite) {
  -webkit-animation: $animation;
  animation: $animation;
}

@mixin axui-transition($transition: all 0.3s ease) {
  -webkit-transition: $transition; /* Safari */
  transition: $transition;
}
