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

.van-skeleton {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  .theme(padding, '@skeleton-padding');

  &__avatar {
    flex-shrink: 0;
    .theme(margin-right, '@padding-md');
    .theme(background-color, '@skeleton-avatar-background-color');

    &--round {
      border-radius: 100%;
    }
  }

  &__content {
    flex: 1;
  }

  &__avatar + &__content {
    .theme(padding-top, '@padding-xs');
  }

  &__row,
  &__title {
    .theme(height, '@skeleton-row-height');
    .theme(background-color, '@skeleton-row-background-color');
  }

  &__title {
    margin: 0;
  }

  &__row {
    &:not(:first-child) {
      .theme(margin-top, '@skeleton-row-margin-top');
    }
  }

  &__title + &__row {
    margin-top: 20px;
  }

  &--animate {
    animation: van-skeleton-blink @skeleton-animation-duration ease-in-out
      infinite;
  }
}

@keyframes van-skeleton-blink {
  50% {
    opacity: 0.6;
  }
}
