// Border
%border-0 {
  border: 0;
}

%border-top-0 {
  border-top: 0;
}

%border-right-0 {
  border-right: 0;
}

%border-bottom-0 {
  border-bottom: 0;
}

%border-left-0 {
  border-left: 0;
}

// Border width
@for $i from 1 through 10 {
  %border-#{$i} {
    border-width: ($i / 10) + rem;
  }
  %border-top-#{$i} {
    border-top-width: ($i / 10) + rem;
  }
  %border-right-#{$i} {
    border-right-width: ($i / 10) + rem;
  }
  %border-bottom-#{$i} {
    border-bottom-width: ($i / 10) + rem;
  }
  %border-left-#{$i} {
    border-left-width: ($i / 10) + rem;
  }
}

// Border-radius
$radius-sizes: (
  base: $border-radius-base,
  sm: $border-radius-sm,
  md: $border-radius-md,
  lg: $border-radius-lg
);

@each $size, $value in $radius-sizes {
  %rounded-#{$size} {
    border-radius: $value;
  }

  %rounded-top-#{$size} {
    border-top-left-radius: $value;
    border-top-right-radius: $value;
  }

  %rounded-right-#{$size} {
    border-top-right-radius: $value;
    border-bottom-right-radius: $value;
  }

  %rounded-bottom-#{$size} {
    border-bottom-left-radius: $value;
    border-bottom-right-radius: $value;
  }

  %rounded-left-#{$size} {
    border-top-left-radius: $value;
    border-bottom-left-radius: $value;
  }
}

%rounded-circle {
  border-radius: 50%;
}

%rounded-0 {
  border-radius: 0;
}

// Border color
$border-colors: (
  gray-base: $gray-base,
  gray-darker: $gray-darker,
  gray-dark: $gray-dark,
  gray-light: $gray-light,
  gray-lighter: $gray-lighter,
  primary: $primary,
  success: $brand-success,
  info: $brand-info,
  warning: $brand-warning,
  danger: $brand-danger
);

@each $parent, $color in $border-colors {
  %border-#{$parent} {
    border-color: $color;
  }
}

%border-white {
  border-color: #fff;
}

%border-gray {
  border-color: $gray;
}

%border-transparent {
  border-color: transparent;
}

// border style
@each $p in (null, -top, -right, -bottom, -left) {
  %dotted#{$p} {
    border#{$p}-style: dotted;
  }
  %dashed#{$p} {
    border#{$p}-style: dashed;
  }
  %solid#{$p} {
    border#{$p}-style: solid;
  }
}

