_theme-radar.scss 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* ------------------------------------------------------------------------------
  2. *
  3. * # Pace. Radar theme
  4. *
  5. * Radar css spinner theme for Pace.
  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: $white;
  14. $pace-loader-size: 1.875rem;
  15. $pace-loader-border-width: 0.125rem;
  16. // Pace theme styles
  17. // ------------------------------
  18. // Overlay
  19. .pace-running {
  20. position: fixed;
  21. top: 0;
  22. left: 0;
  23. width: 100%;
  24. height: 100%;
  25. background-color: $pace-overlay-color;
  26. // Hide all content
  27. > *:not(.pace) {
  28. opacity: 0;
  29. }
  30. }
  31. // Base
  32. .pace {
  33. position: fixed;
  34. top: 50%;
  35. left: 0;
  36. right: 0;
  37. margin-top: -($pace-loader-size / 2);
  38. z-index: 9999;
  39. user-select: none;
  40. pointer-events: none;
  41. // Change colors on light/dark backgrounds
  42. @if (lightness($pace-overlay-color) < 75) {
  43. color: $white;
  44. }
  45. }
  46. // Progress
  47. .pace-progress {
  48. width: 100% !important;
  49. }
  50. // Activity
  51. .pace-activity {
  52. position: absolute;
  53. top: 0;
  54. left: 0;
  55. right: 0;
  56. margin: auto;
  57. border: $pace-loader-border-width solid transparent;
  58. border-top-color: $pace-loader-color;
  59. border-bottom-color: $pace-loader-color;
  60. border-radius: 50%;
  61. animation: rotation 1.1s infinite linear;
  62. @include size($pace-loader-size);
  63. }
  64. // Hide inactive
  65. .pace-inactive {
  66. display: none;
  67. }
  68. // Progress text
  69. @if $pace-show-text {
  70. .pace-progress:after {
  71. content: attr(data-progress-text);
  72. text-align: center;
  73. width: 100%;
  74. display: inline-block;
  75. white-space: nowrap;
  76. margin-top: $pace-loader-size + ($spacer / 1.5);
  77. }
  78. }
  79. }