@import "./variables";

.#{$component-prefix}divider {
  display: flex;
  align-items: center;
  margin: $divider-margin;
  font-size: $divider-font-size;
  line-height: $divider-line-height;
  color: $divider-color;
  border-color: $divider-border-color;
  border-style: solid;
  border-width: 0;

  &::before,
  &::after {
    box-sizing: border-box;
    display: block;
    flex: 1;
    height: 1px * $hd;
    border-color: inherit;
    border-style: inherit;
    border-width: $divider-border-width;
  }

  &::before {
    content: '';
  }

  &--hairline {
    &::before,
    &::after {
      transform: scaleY(0.5);
    }
  }

  &--dashed {
    border-style: dashed;
  }

  &--content-center,
  &--content-left,
  &--content-right {
    &::before {
      margin-right: $divider-content-padding;
    }

    &::after {
      margin-left: $divider-content-padding;
      content: '';
    }
  }

  &--content-left {
    &::before {
      max-width: $divider-content-left-width;
    }
  }

  &--content-right {
    &::after {
      max-width: $divider-content-right-width;
    }
  }
}
