:root {
  --van-divider-margin: var(--van-padding-md) 0;
  --van-divider-vertical-margin: 0 var(--van-padding-xs);
  --van-divider-text-color: var(--van-text-color-2);
  --van-divider-font-size: var(--van-font-size-md);
  --van-divider-line-height: 24px;
  --van-divider-border-color: var(--van-border-color);
  --van-divider-content-padding: var(--van-padding-md);
  --van-divider-content-left-width: 10%;
  --van-divider-content-right-width: 10%;
}

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

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

  &::before {
    content: '';
  }

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

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

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

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

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

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

  &--vertical {
    display: inline-block;
    width: var(--van-border-width);
    height: 1em;
    margin: var(--van-divider-vertical-margin);
    vertical-align: middle;

    &::before {
      height: 100%;
      border-width: 0 0 0 var(--van-border-width);
    }

    &::after {
      display: none;
    }

    &.van-divider--hairline {
      &::before {
        transform: scaleX(0.5);
      }
    }
  }
}
