_theme-bar-sm.scss 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /* ------------------------------------------------------------------------------
  2. *
  3. * # Pace. Progress bar theme
  4. *
  5. * Bar css spinner theme for Pace. Default size
  6. *
  7. * ---------------------------------------------------------------------------- */
  8. // Check if component is enabled
  9. @if $enable-pace {
  10. // Define variables
  11. $pace-show-text: true;
  12. $pace-overlay-color: $color-slate-900;
  13. $pace-loader-color: $color-success-400;
  14. $pace-loader-width: 14rem;
  15. $pace-loader-height: 0.25rem;
  16. $pace-loader-spacer: 0.0625rem;
  17. // Pace theme styles
  18. // ------------------------------
  19. // Overlay
  20. .pace-running {
  21. position: fixed;
  22. top: 0;
  23. left: 0;
  24. width: 100%;
  25. height: 100%;
  26. background-color: $pace-overlay-color;
  27. // Hide all content
  28. > *:not(.pace) {
  29. opacity: 0;
  30. }
  31. }
  32. // Base
  33. .pace {
  34. position: fixed;
  35. margin: auto;
  36. top: 0;
  37. left: 0;
  38. right: 0;
  39. bottom: 0;
  40. width: $pace-loader-width;
  41. height: $pace-loader-height;
  42. background-color: rgba($black, 0.4);
  43. border-radius: $border-radius-round;
  44. background-clip: padding-box;
  45. pointer-events: none;
  46. user-select: none;
  47. z-index: 9999;
  48. // Change colors on light/dark backgrounds
  49. @if (lightness($pace-overlay-color) < 75) {
  50. background-color: rgba($black, 0.4);
  51. color: $white;
  52. }
  53. @else {
  54. background-color: rgba($black, 0.8);
  55. }
  56. }
  57. // Progress
  58. .pace-progress {
  59. max-width: ($pace-loader-width - ($pace-loader-spacer * 2));
  60. z-index: 9999;
  61. display: block;
  62. position: absolute;
  63. left: $pace-loader-spacer;
  64. top: $pace-loader-spacer;
  65. height: ($pace-loader-height - ($pace-loader-spacer * 2));
  66. background-color: $pace-loader-color;
  67. font-size: $font-size-sm;
  68. border-radius: $border-radius-round;
  69. background-clip: padding-box;
  70. width: 0;
  71. }
  72. // Hide inactive
  73. .pace-inactive {
  74. display: none;
  75. }
  76. // Progress text
  77. @if $pace-show-text {
  78. .pace-progress:after {
  79. content: attr(data-progress-text);
  80. text-align: center;
  81. width: 100%;
  82. display: inline-block;
  83. white-space: nowrap;
  84. margin-top: $pace-loader-height + 0.5rem;
  85. }
  86. }
  87. }