VProgressLinear.sass 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. @use '../../styles/tools'
  2. @use './variables' as *
  3. @include tools.layer('components')
  4. // Block
  5. .v-progress-linear
  6. background: transparent
  7. overflow: hidden
  8. position: relative
  9. transition: $progress-linear-transition
  10. width: 100%
  11. &--rounded
  12. @include tools.rounded($progress-linear-border-radius)
  13. @media (forced-colors: active)
  14. border: thin solid buttontext
  15. // Elements
  16. .v-progress-linear__background,
  17. .v-progress-linear__buffer
  18. background: $progress-linear-background
  19. bottom: 0
  20. left: 0
  21. opacity: $progress-linear-background-opacity
  22. position: absolute
  23. top: 0
  24. width: 100%
  25. transition-property: width, left, right
  26. transition: inherit
  27. @media (forced-colors: active)
  28. .v-progress-linear__buffer
  29. background-color: highlight
  30. opacity: $progress-linear-stream-opacity
  31. .v-progress-linear__content
  32. align-items: center
  33. display: flex
  34. height: 100%
  35. justify-content: center
  36. left: 0
  37. pointer-events: none
  38. position: absolute
  39. top: 0
  40. width: 100%
  41. .v-progress-linear__determinate,
  42. .v-progress-linear__indeterminate
  43. background: $progress-linear-background
  44. @media (forced-colors: active)
  45. background-color: highlight
  46. .v-progress-linear__determinate
  47. height: inherit
  48. left: 0
  49. position: absolute
  50. transition: inherit
  51. transition-property: width, left, right
  52. .v-progress-linear__indeterminate
  53. .long, .short
  54. animation-play-state: paused
  55. animation-duration: $progress-linear-indeterminate-animation-duration
  56. animation-iteration-count: infinite
  57. bottom: 0
  58. height: inherit
  59. left: 0
  60. position: absolute
  61. right: auto
  62. top: 0
  63. width: auto
  64. .long
  65. animation-name: indeterminate-ltr
  66. .short
  67. animation-name: indeterminate-short-ltr
  68. .v-progress-linear__stream
  69. animation: $progress-linear-stream-animation
  70. animation-play-state: paused
  71. bottom: 0
  72. left: auto
  73. opacity: $progress-linear-stream-opacity
  74. pointer-events: none
  75. position: absolute
  76. transition: inherit
  77. transition-property: width, left, right
  78. // Modifiers
  79. .v-progress-linear--reverse
  80. .v-progress-linear__background,
  81. .v-progress-linear__determinate,
  82. .v-progress-linear__content
  83. left: auto
  84. right: 0
  85. .v-progress-linear__indeterminate
  86. .long, .short
  87. left: auto
  88. right: 0
  89. .long
  90. animation-name: indeterminate-rtl
  91. .short
  92. animation-name: indeterminate-short-rtl
  93. .v-progress-linear__stream
  94. right: auto
  95. .v-progress-linear--absolute,
  96. .v-progress-linear--fixed
  97. left: 0
  98. z-index: 1
  99. .v-progress-linear--absolute
  100. position: absolute
  101. .v-progress-linear--fixed
  102. position: fixed
  103. .v-progress-linear--rounded
  104. @include tools.rounded($progress-linear-border-radius)
  105. &.v-progress-linear--rounded-bar
  106. .v-progress-linear__determinate,
  107. .v-progress-linear__indeterminate
  108. border-radius: inherit
  109. .v-progress-linear--striped
  110. .v-progress-linear__determinate
  111. animation: $progress-linear-striped-animation
  112. background-image: $progress-linear-stripe-gradient
  113. background-repeat: repeat
  114. background-size: $progress-linear-striped-size
  115. .v-progress-linear--active
  116. .v-progress-linear__indeterminate
  117. .long, .short
  118. animation-play-state: running
  119. .v-progress-linear__stream
  120. animation-play-state: running
  121. .v-progress-linear--rounded-bar
  122. .v-progress-linear__determinate,
  123. .v-progress-linear__indeterminate,
  124. .v-progress-linear__stream + .v-progress-linear__background
  125. @include tools.rounded($progress-linear-border-radius)
  126. .v-progress-linear__determinate
  127. border-start-start-radius: 0
  128. border-end-start-radius: 0
  129. // Keyframes
  130. @keyframes indeterminate-ltr
  131. 0%
  132. left: -90%
  133. right: 100%
  134. 60%
  135. left: -90%
  136. right: 100%
  137. 100%
  138. left: 100%
  139. right: -35%
  140. @keyframes indeterminate-rtl
  141. 0%
  142. left: 100%
  143. right: -90%
  144. 60%
  145. left: 100%
  146. right: -90%
  147. 100%
  148. left: -35%
  149. right: 100%
  150. @keyframes indeterminate-short-ltr
  151. 0%
  152. left: -200%
  153. right: 100%
  154. 60%
  155. left: 107%
  156. right: -8%
  157. 100%
  158. left: 107%
  159. right: -8%
  160. @keyframes indeterminate-short-rtl
  161. 0%
  162. left: 100%
  163. right: -200%
  164. 60%
  165. left: -8%
  166. right: 107%
  167. 100%
  168. left: -8%
  169. right: 107%
  170. @keyframes stream
  171. to
  172. transform: translateX(var(--v-progress-linear-stream-to))
  173. @keyframes progress-linear-stripes
  174. 0%
  175. background-position-x: $progress-linear-striped-size