@import '../common/style/var.less';

.van-divider {
  display: flex;
  align-items: center;
  border-style: solid;
  border-width: 0;
  margin: var(--divider-margin, @divider-margin);
  color: var(--divider-text-color, @divider-text-color);
  font-size: var(--divider-font-size, @divider-font-size);
  line-height: var(--divider-line-height, @divider-line-height);
  border-color: var(--divider-border-color, @divider-border-color);

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

  &::before {
    content: '';
  }

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

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

  &--center,
  &--left,
  &--right {
    &::before {
      margin-right: var(--divider-content-padding, @divider-content-padding);
    }

    &::after {
      content: '';
      margin-left: var(--divider-content-padding, @divider-content-padding);
    }
  }

  &--left {
    &::before {
      max-width: var(--divider-content-left-width, @divider-content-left-width);
    }
  }

  &--right {
    &::after {
      max-width: var(
        --divider-content-right-width,
        @divider-content-right-width
      );
    }
  }
}
