_theme-tail.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /* ------------------------------------------------------------------------------
  2. *
  3. * # Pace. Tail theme
  4. *
  5. * Tail 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: 2.25rem;
  15. $pace-loader-border-width: 0.1875rem;
  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-left-color: $pace-loader-color;
  59. border-radius: 50%;
  60. animation: rotation 1.1s infinite linear;
  61. @include size($pace-loader-size);
  62. }
  63. // Hide inactive
  64. .pace-inactive {
  65. display: none;
  66. }
  67. // Progress text
  68. @if $pace-show-text {
  69. .pace-progress:after {
  70. content: attr(data-progress-text);
  71. text-align: center;
  72. width: 100%;
  73. display: inline-block;
  74. white-space: nowrap;
  75. margin-top: $pace-loader-size + ($spacer / 1.5);
  76. }
  77. }
  78. }