VSkeletonLoader.sass 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. // Imports
  2. @use '../../styles/settings'
  3. @use '../../styles/tools'
  4. @use './variables' as *
  5. .v-skeleton-loader
  6. align-items: center
  7. background: $skeleton-loader-background
  8. border-radius: $skeleton-loader-border-radius
  9. display: flex
  10. flex-wrap: wrap
  11. position: relative
  12. vertical-align: top
  13. &__actions
  14. justify-content: end
  15. .v-skeleton-loader__avatar,
  16. .v-skeleton-loader__button,
  17. .v-skeleton-loader__chip,
  18. .v-skeleton-loader__divider,
  19. .v-skeleton-loader__heading,
  20. .v-skeleton-loader__image,
  21. .v-skeleton-loader__text
  22. background: $skeleton-loader-text-background
  23. .v-skeleton-loader__list-item,
  24. .v-skeleton-loader__list-item-avatar,
  25. .v-skeleton-loader__list-item-text,
  26. .v-skeleton-loader__list-item-two-line,
  27. .v-skeleton-loader__list-item-avatar-two-line,
  28. .v-skeleton-loader__list-item-three-line,
  29. .v-skeleton-loader__list-item-avatar-three-line
  30. border-radius: $skeleton-loader-border-radius
  31. &__bone
  32. align-items: center
  33. border-radius: inherit
  34. display: flex
  35. flex: 1 1 100%
  36. flex-wrap: wrap
  37. overflow: hidden
  38. position: relative
  39. &::after
  40. @include tools.absolute(true)
  41. animation: $skeleton-loader-loading-animation
  42. background: $skeleton-loader-bone-background
  43. transform: $skeleton-loader-loading-transform
  44. z-index: 1
  45. &__avatar
  46. border-radius: 50%
  47. flex: 0 1 auto
  48. margin: $skeleton-loader-avatar-margin
  49. max-height: $skeleton-loader-avatar-height
  50. min-height: $skeleton-loader-avatar-height
  51. height: $skeleton-loader-avatar-height
  52. max-width: $skeleton-loader-avatar-width
  53. min-width: $skeleton-loader-avatar-width
  54. width: $skeleton-loader-avatar-width
  55. + .v-skeleton-loader__bone
  56. flex: 1 1 auto
  57. margin-inline-start: 0
  58. + .v-skeleton-loader__sentences,
  59. + .v-skeleton-loader__paragraph
  60. > .v-skeleton-loader__text
  61. margin-inline-start: 0
  62. &__button
  63. border-radius: $skeleton-loader-button-border-radius
  64. height: $skeleton-loader-button-height
  65. margin: $skeleton-loader-gutter
  66. max-width: $skeleton-loader-button-width
  67. + .v-skeleton-loader__bone
  68. flex: 1 1 auto
  69. margin-inline-start: 0
  70. + .v-skeleton-loader__sentences,
  71. + .v-skeleton-loader__paragraph
  72. > .v-skeleton-loader__text
  73. margin-inline-start: 0
  74. &__chip
  75. border-radius: $skeleton-loader-chip-border-radius
  76. margin: $skeleton-loader-gutter
  77. height: $skeleton-loader-chip-height
  78. max-width: $skeleton-loader-chip-width
  79. + .v-skeleton-loader__bone
  80. flex: 1 1 auto
  81. margin-inline-start: 0
  82. + .v-skeleton-loader__sentences,
  83. + .v-skeleton-loader__paragraph
  84. > .v-skeleton-loader__text
  85. margin-inline-start: 0
  86. &__date-picker
  87. border-radius: $skeleton-loader-date-picker-border-radius
  88. .v-skeleton-loader__list-item:first-child
  89. .v-skeleton-loader__text
  90. max-width: $skeleton-loader-date-picker-text-max-width
  91. width: $skeleton-loader-date-picker-text-width
  92. .v-skeleton-loader__heading
  93. max-width: $skeleton-loader-date-picker-heading-max-width
  94. width: $skeleton-loader-date-picker-heading-width
  95. &__date-picker-days
  96. flex-wrap: wrap
  97. margin: $skeleton-loader-gutter
  98. .v-skeleton-loader__avatar
  99. border-radius: $skeleton-loader-border-radius
  100. margin: $skeleton-loader-date-picker-days-margin
  101. max-width: 100%
  102. &__date-picker-options
  103. flex-wrap: nowrap
  104. .v-skeleton-loader__text
  105. flex: 1 1 auto
  106. &__divider
  107. border-radius: $skeleton-loader-divider-border-radius
  108. height: $skeleton-loader-divider-height
  109. &__heading
  110. border-radius: $skeleton-loader-heading-border-radius
  111. margin: $skeleton-loader-gutter
  112. height: $skeleton-loader-heading-height
  113. + .v-skeleton-loader__subtitle
  114. margin-top: -$skeleton-loader-gutter
  115. &__image
  116. height: $skeleton-loader-image-height
  117. border-radius: 0
  118. &__card
  119. .v-skeleton-loader__image
  120. border-radius: 0
  121. &__list-item
  122. margin: $skeleton-loader-gutter
  123. .v-skeleton-loader__text
  124. margin: 0
  125. &__table-thead
  126. justify-content: space-between
  127. .v-skeleton-loader__heading
  128. margin-top: $skeleton-loader-gutter
  129. max-width: $skeleton-loader-gutter
  130. &__table-tfoot
  131. flex-wrap: nowrap
  132. > .v-skeleton-loader__text.v-skeleton-loader__bone
  133. margin-top: $skeleton-loader-gutter
  134. &__table-row
  135. align-items: baseline
  136. margin: $skeleton-loader-table-row-margin
  137. justify-content: space-evenly
  138. flex-wrap: nowrap
  139. > .v-skeleton-loader__text.v-skeleton-loader__bone
  140. margin-inline-start: $skeleton-loader-table-row-text-margin
  141. margin-inline-end: $skeleton-loader-table-row-text-margin
  142. + .v-skeleton-loader__divider
  143. margin: 0 $skeleton-loader-gutter
  144. &__table-cell
  145. align-items: center
  146. display: flex
  147. height: $skeleton-loader-table-cell-height
  148. width: $skeleton-loader-table-cell-width
  149. .v-skeleton-loader__text
  150. margin-bottom: 0
  151. &__subtitle
  152. max-width: $skeleton-loader-subtitle-max-width
  153. > .v-skeleton-loader__text
  154. height: $skeleton-loader-subtitle-text-height
  155. border-radius: $skeleton-loader-subtitle-text-border-radius
  156. &__text
  157. border-radius: $skeleton-loader-text-border-radius
  158. margin: $skeleton-loader-gutter
  159. height: $skeleton-loader-text-height
  160. + .v-skeleton-loader__text
  161. margin-top: $skeleton-loader-text-two-text-margin-top
  162. max-width: $skeleton-loader-text-two-text-max-width
  163. + .v-skeleton-loader__text
  164. max-width: $skeleton-loader-text-three-text-max-width
  165. &--boilerplate
  166. .v-skeleton-loader__bone:after
  167. display: none
  168. &--is-loading
  169. overflow: hidden
  170. &--tile
  171. border-radius: 0
  172. .v-skeleton-loader__bone
  173. border-radius: 0
  174. @keyframes loading
  175. 100%
  176. transform: translateX(100%)