@import "../common/varible";
@import "../common/function";

.yu-placeholder {
  @keyframes progress-active {
    0% {
      opacity: 0;
      width: 0;
    }
    20% {
      opacity: 0.5;
      width: 0;
    }
    100% {
      opacity: 0;
      width: 100%;
    }
  }
  display: flex;
  .image {
    flex-shrink: 0;
    vertical-align: top;
    display: inline-block;
    width: 60px;
    height: 60px;
    background: $background;
    position: relative;
    box-sizing: content-box;
    margin-right: $space;
    margin-bottom: $space;
  }

  ul {
    vertical-align: top;
    width: 100%;
    margin: 0;
    @include reset-ul();
    li {
      width: 100%;
      height: 16px;
      background-color: $background;
      position: relative;
      margin-bottom: $space;
      &.short {
        width: 60%;
      }
      &.normal {
        width: 70%;
      }
      &.long {
        width: 80%;
      }
    }
  }

  &.active {
    .image {
      &:before {
        content: "";
        opacity: 0;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ccc;
        animation: progress-active 1.5s ease infinite;
      }
    }

    ul {
      li {
        &:before {
          content: "";
          opacity: 0;
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          background: #ccc;
          animation: progress-active 1.5s ease infinite;
        }
      }
    }
  }
}