@import '../../style/theme/index';

$skeleton-prefix-cls: #{$anna-prefix}-skeleton;

.#{$skeleton-prefix-cls} {
  position: relative;
  &-placeholder{
    // padding: 24px 0; // 加padding会导致切换时晃动一下
    // background-color: $light-base;
    visibility: visible;
    opacity: 1;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  }
  &-item{
    margin-bottom: 60px;
    &:nth-last-child(1){
      margin-bottom: 0;
    }
  }
  &-hidden{ // activeClass必须放到后面
    visibility: hidden;
    opacity: 0;
  }
  &-title{
    margin-left: 24px;
    height: 26px;
    border-radius: 6px;
    width: 260px;
    background-color: rgba(24, 144, 255, 0.2);
    margin-bottom: 16px;
  }
  &-row{
    margin: 0 24px;
    height: 20px;
    border-radius: 6px;
    background-color: $btn-default-bg;
    margin-bottom: 16px;
  }
  &-image{
    margin: 24px;
    height: 340px;
    border-radius: 16px;
    background-color: $btn-default-bg;
  }
  &-avatar{
    margin: 0 24px 16px;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background-color: $btn-default-bg;
  }
  &-container{
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  }
  &-container-active{
    visibility: visible;
    opacity: 1;
  }
  &-active{
    background: linear-gradient(90deg, $btn-default-bg 25%, $skeleton-gradient-bg 37%, $btn-default-bg 63%);
    background-size: 400% 100%;
    animation: anna-skeleton-loading 1.4s ease infinite;
  }
  
  @keyframes anna-skeleton-loading {
    0% {
      background-position: 100% 50%;
    }
    100% {
      background-position: 0 50%;
    }
  }
}


