_progress.scss 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. @keyframes progress-indeterminate {
  2. 0% {
  3. right: 100%;
  4. left: -35%;
  5. }
  6. 100%,
  7. 60% {
  8. right: -90%;
  9. left: 100%;
  10. }
  11. }
  12. /**
  13. Progress
  14. */
  15. .progress {
  16. position: relative;
  17. width: 100%;
  18. line-height: $progress-height;
  19. appearance: none;
  20. &::-webkit-progress-bar {
  21. background: var(--#{$prefix}progress-bg);
  22. }
  23. &::-webkit-progress-value {
  24. background-color: var(--#{$prefix}primary);
  25. }
  26. &::-moz-progress-bar {
  27. background-color: var(--#{$prefix}primary);
  28. }
  29. &::-ms-fill {
  30. background-color: var(--#{$prefix}primary);
  31. border: none;
  32. }
  33. }
  34. .progress-sm {
  35. height: .25rem;
  36. }
  37. /**
  38. Progress bar
  39. */
  40. .progress-bar {
  41. height: 100%;
  42. }
  43. .progress-bar-indeterminate {
  44. &:after,
  45. &:before {
  46. position: absolute;
  47. top: 0;
  48. bottom: 0;
  49. left: 0;
  50. content: "";
  51. background-color: inherit;
  52. will-change: left, right;
  53. }
  54. &:before {
  55. animation: progress-indeterminate 1.5s cubic-bezier(.65, .815, .735, .395) infinite;
  56. }
  57. }
  58. .progress-separated {
  59. .progress-bar {
  60. box-shadow: 0 0 0 2px var(--#{$prefix}card-bg, var(--#{$prefix}bg-surface));
  61. }
  62. }
  63. /**
  64. Progressbg
  65. */
  66. .progressbg {
  67. position: relative;
  68. padding: .25rem .5rem;
  69. display: flex;
  70. }
  71. .progressbg-text {
  72. position: relative;
  73. z-index: 1;
  74. @include text-truncate;
  75. }
  76. .progressbg-progress {
  77. position: absolute;
  78. top: 0;
  79. right: 0;
  80. bottom: 0;
  81. left: 0;
  82. z-index: 0;
  83. height: 100%;
  84. background: transparent;
  85. pointer-events: none;
  86. }
  87. .progressbg-value {
  88. font-weight: var(--#{$prefix}font-weight-medium);
  89. margin-left: auto;
  90. padding-left: 2rem;
  91. }