skeleton.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. @import './variables.scss';
  2. $module: #{$prefix}-skeleton;
  3. .#{$module} {
  4. &-avatar,
  5. &-image,
  6. &-title,
  7. &-button {
  8. background: $color-skeleton_default-bg-default;
  9. border-radius: $radius-skeleton_item;
  10. }
  11. &-avatar {
  12. &-circle {
  13. border-radius: 50%;
  14. }
  15. &-extra-extra-small {
  16. width: $width-skeleton_avatar_extra_extra_small;
  17. height: $width-skeleton_avatar_extra_extra_small;
  18. }
  19. &-extra-small {
  20. width: $width-skeleton_avatar_extra_small;
  21. height: $width-skeleton_avatar_extra_small;
  22. }
  23. &-medium {
  24. width: $width-skeleton_avatar_medium;
  25. height: $width-skeleton_avatar_medium;
  26. }
  27. &-small {
  28. width: $width-skeleton_avatar_small;
  29. height: $width-skeleton_avatar_small;
  30. }
  31. &-large {
  32. width: $width-skeleton_avatar_large;
  33. height: $width-skeleton_avatar_large;
  34. }
  35. &-extra-large {
  36. width: $width-skeleton_avatar_extra_large;
  37. height: $width-skeleton_avatar_extra_large;
  38. }
  39. }
  40. &-paragraph {
  41. margin: $spacing-none;
  42. padding: $spacing-none;
  43. list-style-type: none;
  44. li {
  45. background: $color-skeleton_default-bg-default;
  46. border-radius: $radius-skeleton_li;
  47. width: 100%;
  48. height: $height-skeleton_li;
  49. margin-bottom: $spacing-skeleton_li-marginBottom;
  50. &:last-child {
  51. width: 60%;
  52. margin-bottom: $spacing-none;
  53. }
  54. &:first-child {
  55. width: 100%;
  56. }
  57. }
  58. }
  59. &-title {
  60. width: 100%;
  61. height: $height-skeleton_title;
  62. }
  63. &-button {
  64. width: $width-skeleton_button;
  65. height: $height-skeleton_button;
  66. }
  67. &-image {
  68. width: 100%;
  69. height: 100%;
  70. }
  71. &-active {
  72. .#{$module}-avatar,
  73. .#{$module}-image,
  74. .#{$module}-title,
  75. .#{$module}-button,
  76. .#{$module}-paragraph li {
  77. background: linear-gradient(
  78. 90deg,
  79. $color-skeleton_default-bg-default 25%,
  80. $color-skeleton_loading-gradient-bg-active 44%,
  81. $color-skeleton_default-bg-default 88%
  82. );
  83. background-size: 400% 100%;
  84. animation: skeleton-loading 1.4s ease infinite;
  85. }
  86. }
  87. @keyframes skeleton-loading {
  88. 0% {
  89. background-position: 100% 50%;
  90. }
  91. 100% {
  92. background-position: 0 50%;
  93. }
  94. }
  95. }
  96. @import './rtl.scss';