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