You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

260 lines
4.9 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. /*
  2. * # Semantic - Loader
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributor
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'element';
  15. @element : 'loader';
  16. @import '../../semantic.config';
  17. /*******************************
  18. Loader
  19. *******************************/
  20. /* Standard Size */
  21. .ui.loader {
  22. display: none;
  23. position: absolute;
  24. top: @loaderTopOffset;
  25. left: @loaderLeftOffset;
  26. margin: 0px;
  27. text-align: center;
  28. z-index: 1000;
  29. transform: translateX(-50%) translateY(-50%);
  30. }
  31. .ui.dimmer .loader {
  32. display: block;
  33. }
  34. .ui.dimmer .ui.loader,
  35. .ui.inverted.loader {
  36. color: @loaderTextColor
  37. }
  38. /*******************************
  39. Types
  40. *******************************/
  41. /*--------------
  42. CSS
  43. ---------------*/
  44. /* Flipping */
  45. .ui.flipping.loader {
  46. width: auto;
  47. height: auto;
  48. background-image: none !important;
  49. }
  50. .ui.flipping.loader .shape {
  51. position: relative;
  52. margin: 0em auto 1em;
  53. color: transparent;
  54. box-shadow: 0px 0px 0px 1px;
  55. animation: loaderFlipping 1s infinite ease;
  56. margin-bottom: 1em;
  57. transform-style: preserve-3d;
  58. }
  59. .ui.flipping.loader .shape:before,
  60. .ui.flipping.loader .shape:after {
  61. position: absolute;
  62. content: '';
  63. top: 0px;
  64. left: 0px;
  65. box-shadow: 0px 0px 0px 1px;
  66. backface-visibility: hidden;
  67. }
  68. .ui.flipping.loader .shape:before {
  69. background-color: @primaryColor;
  70. transform: rotateY(0deg);
  71. z-index: 2;
  72. }
  73. .ui.flipping.loader .shape:after {
  74. background-color: @secondaryColor;
  75. transform: rotateY(180deg);
  76. }
  77. /* Circular */
  78. .ui.flipping.circular.loader .shape,
  79. .ui.flipping.circular.loader .shape:before,
  80. .ui.flipping.circular.loader .shape:after {
  81. border-radius: @circularRadius;
  82. }
  83. /* Sizes */
  84. .ui.mini.flipping.loader .shape,
  85. .ui.mini.flipping.loader .shape:before,
  86. .ui.mini.flipping.loader .shape:after {
  87. width: @miniSize;
  88. height: @miniSize;
  89. }
  90. .ui.flipping.loader .shape,
  91. .ui.flipping.loader .shape:before,
  92. .ui.flipping.loader .shape:after {
  93. width: @mediumSize;
  94. height: @mediumSize;
  95. }
  96. @keyframes loaderFlipping {
  97. 0% {
  98. transform: perspective(6em) rotateX(0deg) rotateY(0deg);
  99. }
  100. 50% {
  101. transform: perspective(6em) rotateX(0deg) rotateY(-180deg);
  102. }
  103. 100% {
  104. transform: perspective(6em) rotateX(0deg) rotateY(-360deg);
  105. }
  106. }
  107. /*-------------------
  108. Text
  109. --------------------*/
  110. .ui.text.loader {
  111. width: auto !important;
  112. height: auto !important;
  113. text-align: center;
  114. font-style: normal;
  115. }
  116. .ui.mini.text.loader {
  117. min-width: @miniSize;
  118. padding-top: (@miniSize + @textDistance);
  119. }
  120. .ui.small.text.loader {
  121. min-width: @smallSize;
  122. padding-top: (@smallSize + @textDistance);
  123. }
  124. .ui.text.loader {
  125. min-width: @mediumSize;
  126. padding-top: (@mediumSize + @textDistance);
  127. }
  128. .ui.large.text.loader {
  129. min-width: @largeSize;
  130. padding-top: (@largeSize + @textDistance);
  131. }
  132. /*******************************
  133. States
  134. *******************************/
  135. .ui.loader.active,
  136. .ui.loader.visible {
  137. display: block;
  138. }
  139. .ui.loader.disabled,
  140. .ui.loader.hidden {
  141. display: none;
  142. }
  143. /*******************************
  144. Variations
  145. *******************************/
  146. /*-------------------
  147. Sizes
  148. --------------------*/
  149. /* Tiny Size */
  150. .ui.inverted.dimmer .ui.mini.loader,
  151. .ui.mini.loader {
  152. width: @miniSize;
  153. height: @miniSize;
  154. font-size: @miniFontSize;
  155. background-image: url(@miniLoaderPath);
  156. }
  157. /* Small Size */
  158. .ui.inverted.dimmer .ui.small.loader,
  159. .ui.small.loader {
  160. width: @smallSize;
  161. height: @smallSize;
  162. font-size: @smallFontSize;
  163. background-image: url(@smallLoaderPath);
  164. }
  165. .ui.inverted.dimmer .ui.loader,
  166. .ui.loader {
  167. width: @mediumSize;
  168. height: @mediumSize;
  169. font-size: @mediumFontSize;
  170. background: url(@mediumLoaderPath) no-repeat;
  171. background-position: 50% 0px;
  172. }
  173. /* Large Size */
  174. .ui.inverted.dimmer .ui.loader.large,
  175. .ui.loader.large {
  176. width: @largeSize;
  177. height: @largeSize;
  178. font-size: @largeFontSize;
  179. background-image: url(@largeLoaderPath);
  180. }
  181. /*-------------------
  182. Inverted
  183. --------------------*/
  184. .ui.inverted.dimmer .ui.loader {
  185. color: @invertedLoaderTextColor;
  186. }
  187. /* Tiny Size */
  188. .ui.dimmer .mini.ui.loader,
  189. .ui.inverted .mini.ui.loader {
  190. background-image: url(@miniInvertedLoaderPath);
  191. }
  192. /* Small Size */
  193. .ui.dimmer .small.ui.loader,
  194. .ui.inverted .small.ui.loader {
  195. background-image: url(@smallInvertedLoaderPath);
  196. }
  197. /* Standard Size */
  198. .ui.dimmer .ui.loader,
  199. .ui.inverted.loader {
  200. background-image: url(@mediumInvertedLoaderPath);
  201. }
  202. /* Large Size */
  203. .ui.dimmer .large.ui.loader,
  204. .ui.inverted .large.ui.loader {
  205. background-image: url(@largeInvertedLoaderPath);
  206. }
  207. /*-------------------
  208. Inline
  209. --------------------*/
  210. .ui.inline.loader {
  211. position: static;
  212. vertical-align: middle;
  213. margin: 0em;
  214. transform: none;
  215. }
  216. .ui.inline.loader.active,
  217. .ui.inline.loader.visible {
  218. display: inline-block;
  219. }
  220. .loadUIOverrides();