You are here

ajax-progress.module.pcss.css in Drupal 10

Throbber.

File

core/themes/claro/css/components/ajax-progress.module.pcss.css
View source
  1. /**
  2. * @file
  3. * Throbber.
  4. */
  5. .ajax-progress {
  6. display: inline-block;
  7. }
  8. /**
  9. * Progress bar.
  10. */
  11. .ajax-progress-bar {
  12. width: 13em;
  13. padding: 0 0.3125rem; /* 0 5px */
  14. }
  15. /**
  16. * Throbber.
  17. */
  18. .ajax-progress--throbber {
  19. position: relative;
  20. display: inline-flex;
  21. align-content: center;
  22. height: 1.125rem;
  23. margin: -3px var(--ajax-progress-margin-horizontal) 0;
  24. vertical-align: middle;
  25. white-space: nowrap;
  26. line-height: 1.125rem;
  27. }
  28. /**
  29. * Remove margin from ajax throbbers following buttons because buttons already
  30. * have a large margin set.
  31. */
  32. .js .button:not(.js-hide) + .ajax-progress--throbber {
  33. margin-left: 0; /* LTR */
  34. }
  35. [dir="rtl"].js .button:not(.js-hide) + .ajax-progress--throbber {
  36. margin-right: 0;
  37. margin-left: var(--ajax-progress-margin-horizontal);
  38. }
  39. /**
  40. * Restore start margin for ajax throbbers inside a managed file widget.
  41. */
  42. .js .form-type--managed-file .button:not(.js-hide) + .ajax-progress--throbber,
  43. .js .file-operations-cell .button:not(.js-hide) + .ajax-progress--throbber {
  44. margin-left: var(--ajax-progress-margin-horizontal); /* LTR */
  45. }
  46. [dir="rtl"].js .form-type--managed-file .button:not(.js-hide) + .ajax-progress--throbber,
  47. [dir="rtl"].js .file-operations-cell .button:not(.js-hide) + .ajax-progress--throbber {
  48. margin-right: var(--ajax-progress-margin-horizontal);
  49. margin-left: var(--ajax-progress-margin-horizontal);
  50. }
  51. .ajax-progress__throbber {
  52. box-sizing: border-box;
  53. width: 1.125rem;
  54. height: 1.125rem;
  55. animation: claro-throbber 0.75s linear infinite;
  56. border: 2px solid var(--color-absolutezero);
  57. border-right: 2px dotted transparent;
  58. border-radius: 50%;
  59. }
  60. .ajax-progress__message {
  61. display: inline-block;
  62. padding-left: var(--ajax-progress-margin-horizontal);
  63. font-size: var(--font-size-label);
  64. }
  65. [dir="rtl"] .ajax-progress__message {
  66. padding-right: var(--ajax-progress-margin-horizontal);
  67. padding-left: 0;
  68. }
  69. /**
  70. * Full screen throbber.
  71. */
  72. .ajax-progress--fullscreen,
  73. .ui-dialog .ajax-progress--throbber {
  74. position: fixed;
  75. z-index: 1000;
  76. top: 50%;
  77. left: 50%;
  78. box-sizing: border-box;
  79. width: 3.5rem; /* 56px */
  80. height: 3.5rem;
  81. margin: -1.75rem;
  82. border: var(--input-border-size) solid var(--jui-dropdown-border-color);
  83. border-radius: 3.5rem;
  84. background: var(--color-white);
  85. box-shadow: 0 0.25rem 0.625rem var(--jui-dropdown-shadow-color);
  86. }
  87. .ajax-progress__throbber--fullscreen,
  88. .ui-dialog .ajax-progress__throbber {
  89. position: absolute;
  90. top: 50%;
  91. left: 50%;
  92. width: 1.75rem; /* 28px */
  93. height: 1.75rem; /* 28px */
  94. margin: -0.875rem;
  95. content: "";
  96. border: 3px solid var(--color-absolutezero);
  97. border-right: 3px dotted transparent;
  98. }
  99. .ui-dialog .ajax-progress__message {
  100. display: none;
  101. }
  102. @media screen and (-ms-high-contrast: active) {
  103. /**
  104. * Throbber animation is shaky on Edge RTL on high contrast for border width
  105. * less than 4px.
  106. */
  107. @supports (-ms-ime-align:auto) {
  108. [dir="rtl"] .ajax-progress__throbber {
  109. border-width: 4px;
  110. }
  111. }
  112. }
  113. @keyframes claro-throbber {
  114. 0% {
  115. transform: rotateZ(0);
  116. }
  117. 100% {
  118. transform: rotateZ(360deg);
  119. }
  120. }