index.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. @import '../common/abstracts/variable';
  2. @import '../common/abstracts/mixin';
  3. .wot-theme-dark {
  4. @include b(skeleton) {
  5. @include e(col) {
  6. background-color: $-dark-background4;
  7. }
  8. }
  9. }
  10. @include b(skeleton) {
  11. box-sizing: border-box;
  12. @include e(row) {
  13. justify-content: space-between;
  14. margin-bottom: $-skeleton-row-margin-bottom;
  15. display: flex;
  16. align-items: center;
  17. &:only-child,
  18. &:last-child {
  19. margin-bottom: 0;
  20. }
  21. }
  22. @include e(col) {
  23. border-radius: $-skeleton-border-radius-text;
  24. background-color: $-skeleton-background-color;
  25. display: flex;
  26. align-items: center;
  27. justify-content: center;
  28. &:first-child:last-child,
  29. &:last-child {
  30. margin-right: 0;
  31. }
  32. }
  33. @include m(type) {
  34. &-text {
  35. width: 100%;
  36. height: $-skeleton-text-height-default;
  37. border-radius: $-skeleton-border-radius-text;
  38. }
  39. &-rect {
  40. width: 100%;
  41. height: $-skeleton-rect-height-default;
  42. border-radius: $-skeleton-border-radius-rect;
  43. }
  44. &-circle {
  45. flex-shrink: 0;
  46. width: $-skeleton-circle-height-default;
  47. height: $-skeleton-circle-height-default;
  48. border-radius: $-skeleton-border-radius-circle;
  49. }
  50. }
  51. @include m(animation) {
  52. &-gradient {
  53. position: relative;
  54. overflow-x: hidden;
  55. &::after {
  56. content: ' ';
  57. position: absolute;
  58. animation: wd-skeleton-gradient 1.5s linear 2s infinite;
  59. background: linear-gradient(90deg, rgba(255, 255, 255, 0), $-skeleton-animation-gradient, rgba(255, 255, 255, 0));
  60. inset: 0;
  61. }
  62. }
  63. &-flashed {
  64. animation: wd-skeleton-flashed 2s linear 2s infinite;
  65. }
  66. }
  67. @keyframes wd-skeleton-gradient {
  68. 0% {
  69. transform: translateX(-100%) skewX(-15deg);
  70. }
  71. 100% {
  72. transform: translateX(100%) skewX(-15deg);
  73. }
  74. }
  75. @keyframes wd-skeleton-flashed {
  76. 0% {
  77. opacity: 1;
  78. }
  79. 50% {
  80. opacity: 0.3;
  81. background-color: $-skeleton-animation-flashed;
  82. }
  83. 100% {
  84. opacity: 1;
  85. }
  86. }
  87. }