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.

233 lines
3.8 KiB

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