VProgressCircular.sass 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. @use 'sass:list'
  2. @use '../../styles/settings'
  3. @use '../../styles/tools'
  4. @use './variables' as *
  5. @include tools.layer('components')
  6. // Elements
  7. .v-progress-circular
  8. align-items: center
  9. display: inline-flex
  10. justify-content: center
  11. position: relative
  12. vertical-align: middle
  13. > svg
  14. width: 100%
  15. height: 100%
  16. margin: auto
  17. position: absolute
  18. top: 0
  19. bottom: 0
  20. left: 0
  21. right: 0
  22. z-index: 0
  23. .v-progress-circular__content
  24. align-items: center
  25. display: flex
  26. justify-content: center
  27. .v-progress-circular__underlay
  28. color: $progress-circular-underlay-color
  29. stroke: currentColor
  30. z-index: 1
  31. .v-progress-circular__overlay
  32. stroke: currentColor
  33. transition: $progress-circular-overlay-transition
  34. z-index: 2
  35. // Modifiers
  36. .v-progress-circular
  37. @each $name, $multiplier in $progress-circular-sizes
  38. $size: $progress-circular-size + (settings.$size-scale * $multiplier)
  39. &--size-#{$name}
  40. height: $size
  41. width: $size
  42. .v-progress-circular--indeterminate
  43. > svg
  44. animation: $progress-circular-rotate-animation
  45. transform-origin: center center
  46. transition: $progress-circular-intermediate-svg-transition
  47. .v-progress-circular__overlay
  48. animation: $progress-circular-rotate-dash, $progress-circular-rotate-animation
  49. stroke-dasharray: 25, 200
  50. stroke-dashoffset: 0
  51. stroke-linecap: round
  52. transform-origin: center center
  53. transform: $progress-circular-overlay-transform
  54. .v-progress-circular--disable-shrink
  55. > svg
  56. animation-duration: list.nth($progress-circular-rotate-animation, 2) * .5
  57. .v-progress-circular__overlay
  58. animation: none
  59. .v-progress-circular--indeterminate:not(.v-progress-circular--visible)
  60. > svg,
  61. .v-progress-circular__overlay
  62. animation-play-state: paused !important
  63. @keyframes progress-circular-dash
  64. 0%
  65. stroke-dasharray: 1, 200
  66. stroke-dashoffset: 0px
  67. 50%
  68. stroke-dasharray: 100, 200
  69. stroke-dashoffset: -15px
  70. 100%
  71. stroke-dasharray: 100, 200
  72. stroke-dashoffset: -124px
  73. @keyframes progress-circular-rotate
  74. 100%
  75. transform: rotate(270deg)