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.

234 lines
3.8 KiB

10 years ago
10 years ago
10 years ago
10 years ago
  1. /*
  2. * # Semantic - Progress Bar
  3. * http://github.com/semantic-org/semantic-ui/
  4. *
  5. *
  6. * Copyright 2014 Contributors
  7. * Released under the MIT license
  8. * http://opensource.org/licenses/MIT
  9. *
  10. */
  11. /*******************************
  12. Theme
  13. *******************************/
  14. @type : 'element';
  15. @element : 'progress';
  16. @import '../../semantic.config';
  17. .ui.progress {
  18. border: 1px solid rgba(0, 0, 0, 0.1);
  19. width: 100%;
  20. height: 35px;
  21. background-color: #FAFAFA;
  22. padding: 5px;
  23. border-radius: 0.3125em;
  24. }
  25. .ui.progress .bar {
  26. display: inline-block;
  27. width: 0%;
  28. height: 100%;
  29. background-color: #CCCCCC;
  30. border-radius: 3px;
  31. transition:
  32. width 1s ease-in-out,
  33. background-color 1s ease-out
  34. ;
  35. }
  36. /*******************************
  37. States
  38. *******************************/
  39. /*--------------
  40. Successful
  41. ---------------*/
  42. .ui.successful.progress .bar {
  43. background-color: @positiveColor !important;
  44. }
  45. .ui.successful.progress .bar,
  46. .ui.successful.progress .bar::after {
  47. animation: none !important;
  48. }
  49. .ui.warning.progress .bar {
  50. background-color: @yellow !important;
  51. }
  52. .ui.warning.progress .bar,
  53. .ui.warning.progress .bar::after {
  54. animation: none !important;
  55. }
  56. /*--------------
  57. Failed
  58. ---------------*/
  59. .ui.failed.progress .bar {
  60. background-color: @negativeColor !important;
  61. }
  62. .ui.failed.progress .bar,
  63. .ui.failed.progress .bar::after {
  64. animation: none !important;
  65. }
  66. /*--------------
  67. Active
  68. ---------------*/
  69. .ui.active.progress .bar {
  70. position: relative;
  71. }
  72. .ui.active.progress .bar::after {
  73. content: '';
  74. opacity: 0;
  75. position: absolute;
  76. top: 0px;
  77. left: 0px;
  78. right: 0px;
  79. bottom: 0px;
  80. background: #FFFFFF;
  81. -moz-border-radius: 3px;
  82. -webkit-border-radius: 3px;
  83. border-radius: 3px;
  84. animation: progress-active 2s ease-out infinite;
  85. }
  86. @keyframes progress-active {
  87. 0% {
  88. opacity: 0;
  89. width: 0;
  90. }
  91. 50% {
  92. opacity: 0.3;
  93. }
  94. 100% {
  95. opacity: 0;
  96. width: 100%;
  97. }
  98. }
  99. /*--------------
  100. Disabled
  101. ---------------*/
  102. .ui.disabled.progress {
  103. opacity: 0.35;
  104. }
  105. .ui.disabled.progress .bar,
  106. .ui.disabled.progress .bar::after {
  107. animation: none !important;
  108. }
  109. /*******************************
  110. Variations
  111. *******************************/
  112. /*--------------
  113. Attached
  114. ---------------*/
  115. /* bottom attached */
  116. .ui.progress.attached {
  117. position: relative;
  118. border: none;
  119. }
  120. .ui.progress.attached,
  121. .ui.progress.attached .bar {
  122. display: block;
  123. height: 3px;
  124. padding: 0px;
  125. overflow: hidden;
  126. border-radius: 0em 0em 0.3125em 0.3125em;
  127. }
  128. .ui.progress.attached .bar {
  129. border-radius: 0em;
  130. }
  131. /* top attached */
  132. .ui.progress.top.attached,
  133. .ui.progress.top.attached .bar {
  134. top: 0px;
  135. border-radius: 0.3125em 0.3125em 0em 0em;
  136. }
  137. .ui.progress.top.attached .bar {
  138. border-radius: 0em;
  139. }
  140. /*--------------
  141. Colors
  142. ---------------*/
  143. .ui.blue.progress .bar {
  144. background-color: @blue;
  145. }
  146. .ui.black.progress .bar {
  147. background-color: @black;
  148. }
  149. .ui.green.progress .bar {
  150. background-color: @green;
  151. }
  152. .ui.red.progress .bar {
  153. background-color: @red;
  154. }
  155. .ui.purple.progress .bar {
  156. background-color: @purple;
  157. }
  158. .ui.teal.progress .bar {
  159. background-color: @teal;
  160. }
  161. /*--------------
  162. Striped
  163. ---------------*/
  164. .ui.progress.striped .bar {
  165. background-size: 30px 30px;
  166. background-image:
  167. linear-gradient(
  168. 135deg, rgba(255, 255, 255, .15) 25%, transparent 25%,
  169. transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%,
  170. transparent 75%, transparent
  171. )
  172. ;
  173. }
  174. .ui.progress.active.striped .bar:after {
  175. animation: none;
  176. }
  177. .ui.progress.active.striped .bar {
  178. animation: progress-striped 3s linear infinite;
  179. }
  180. @keyframes progress-striped {
  181. 0% {
  182. background-position: 0px 0;
  183. }
  184. 100% {
  185. background-position: 60px 0;
  186. }
  187. }
  188. /*--------------
  189. Sizes
  190. ---------------*/
  191. .ui.small.progress .bar {
  192. height: 14px;
  193. }