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.

389 lines
8.5 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
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 : 'module';
  15. @element : 'progress';
  16. @import '../../semantic.config';
  17. .ui.progress {
  18. position: relative;
  19. display: block;
  20. max-width: 100%;
  21. border: @border;
  22. margin: @margin;
  23. box-shadow: @boxShadow;
  24. background: @background;
  25. padding: @padding;
  26. border-radius: @borderRadius;
  27. }
  28. .ui.progress:first-child {
  29. margin: @firstMargin;
  30. }
  31. .ui.progress:last-child {
  32. margin: @lastMargin;
  33. }
  34. /* Indicating */
  35. .ui.indicating.progress .bar[style^="width: 3"] {
  36. background-color: @indicatingSecondColor;
  37. }
  38. .ui.indicating.progress .bar[style^="width: 4"],
  39. .ui.indicating.progress .bar[style^="width: 5"] {
  40. background-color: @indicatingThirdColor;
  41. }
  42. .ui.indicating.progress .bar[style^="width: 6"] {
  43. background-color: @indicatingFourthColor;
  44. }
  45. .ui.indicating.progress .bar[style^="width: 7"],
  46. .ui.indicating.progress .bar[style^="width: 8"] {
  47. background-color: @indicatingFifthColor;
  48. }
  49. .ui.indicating.progress .bar[style^="width: 9"],
  50. .ui.indicating.progress .bar[style^="width: 100"] {
  51. background-color: @indicatingSixthColor;
  52. }
  53. .ui.indicating.progress .bar[style^="width: 1%"],
  54. .ui.indicating.progress .bar[style^="width: 2%"],
  55. .ui.indicating.progress .bar[style^="width: 3%"],
  56. .ui.indicating.progress .bar[style^="width: 4%"],
  57. .ui.indicating.progress .bar[style^="width: 5%"],
  58. .ui.indicating.progress .bar[style^="width: 6%"],
  59. .ui.indicating.progress .bar[style^="width: 7%"],
  60. .ui.indicating.progress .bar[style^="width: 8%"],
  61. .ui.indicating.progress .bar[style^="width: 9%"],
  62. .ui.indicating.progress .bar[style^="width: 1"],
  63. .ui.indicating.progress .bar[style^="width: 2"] {
  64. background-color: @indicatingFirstColor;
  65. }
  66. /* Single Digits Last */
  67. .ui.indicating.progress .bar[style^="width: 1%"] + .label,
  68. .ui.indicating.progress .bar[style^="width: 2%"] + .label,
  69. .ui.indicating.progress .bar[style^="width: 3%"] + .label,
  70. .ui.indicating.progress .bar[style^="width: 4%"] + .label,
  71. .ui.indicating.progress .bar[style^="width: 5%"] + .label,
  72. .ui.indicating.progress .bar[style^="width: 6%"] + .label,
  73. .ui.indicating.progress .bar[style^="width: 7%"] + .label,
  74. .ui.indicating.progress .bar[style^="width: 8%"] + .label,
  75. .ui.indicating.progress .bar[style^="width: 9%"] + .label,
  76. .ui.indicating.progress .bar[style^="width: 1"] + .label,
  77. .ui.indicating.progress .bar[style^="width: 2"] + .label {
  78. color: @indicatingFirstColor;
  79. }
  80. .ui.indicating.progress .bar[style^="width: 3"] + .label {
  81. color: @indicatingSecondColor;
  82. }
  83. .ui.indicating.progress .bar[style^="width: 4"] + .label,
  84. .ui.indicating.progress .bar[style^="width: 5"] + .label {
  85. color: @indicatingThirdColor;
  86. }
  87. .ui.indicating.progress .bar[style^="width: 6"] + .label {
  88. color: @indicatingFourthColor;
  89. }
  90. .ui.indicating.progress .bar[style^="width: 7"] + .label,
  91. .ui.indicating.progress .bar[style^="width: 8"] + .label {
  92. color: @indicatingFifthColor;
  93. }
  94. .ui.indicating.progress .bar[style^="width: 9"] + .label,
  95. .ui.indicating.progress .bar[style^="width: 100"] + .label {
  96. color: @indicatingSixthColor;
  97. }
  98. /*******************************
  99. Content
  100. *******************************/
  101. /* Activity Bar */
  102. .ui.progress .bar {
  103. display: block;
  104. line-height: 1;
  105. position: @barPosition;
  106. width: @barInitialWidth;
  107. min-width: @barMinWidth;
  108. height: @barHeight;
  109. background: @barBackground;
  110. border-radius: @barBorderRadius;
  111. transition: @barTransition;
  112. }
  113. /* Percent Complete */
  114. .ui.progress .bar > .progress {
  115. white-space: nowrap;
  116. position: absolute;
  117. width: @progressWidth;
  118. font-size: @progressSize;
  119. top: @progressTop;
  120. right: @progressRight;
  121. left: @progressLeft;
  122. bottom: @progressBottom;
  123. color: @progressColor;
  124. text-shadow: @progressTextShadow;
  125. margin-top: @progressOffset;
  126. font-weight: @progressFontWeight;
  127. text-align: @progressTextAlign;
  128. }
  129. /* Label */
  130. .ui.progress > .label {
  131. position: absolute;
  132. width: @labelWidth;
  133. font-size: @labelSize;
  134. top: @labelTop;
  135. right: @labelRight;
  136. left: @labelLeft;
  137. bottom: @labelBottom;
  138. color: @labelColor;
  139. font-weight: @labelFontWeight;
  140. text-shadow: @labelTextShadow;
  141. margin-top: @labelOffset;
  142. text-align: @labelTextAlign;
  143. transition: @labelTransition;
  144. }
  145. /*******************************
  146. States
  147. *******************************/
  148. /*--------------
  149. Success
  150. ---------------*/
  151. .ui.progress.success .bar {
  152. background-color: @successColor !important;
  153. }
  154. .ui.progress.success .bar,
  155. .ui.progress.success .bar::after {
  156. animation: none !important;
  157. }
  158. .ui.progress.success > .label {
  159. color: @successHeaderColor;
  160. }
  161. /*--------------
  162. Warning
  163. ---------------*/
  164. .ui.progress.warning .bar {
  165. background-color: @warningColor !important;
  166. }
  167. .ui.progress.warning .bar,
  168. .ui.progress.warning .bar::after {
  169. animation: none !important;
  170. }
  171. .ui.progress.warning > .label {
  172. color: @warningHeaderColor;
  173. }
  174. /*--------------
  175. Error
  176. ---------------*/
  177. .ui.progress.error .bar {
  178. background-color: @errorColor !important;
  179. }
  180. .ui.progress.error .bar,
  181. .ui.progress.error .bar::after {
  182. animation: none !important;
  183. }
  184. .ui.progress.error > .label {
  185. color: @errorHeaderColor;
  186. }
  187. /*--------------
  188. Active
  189. ---------------*/
  190. .ui.active.progress .bar {
  191. position: relative;
  192. min-width: @activeMinWidth;
  193. }
  194. .ui.active.progress .bar::after {
  195. content: '';
  196. opacity: 0;
  197. position: absolute;
  198. top: 0px;
  199. left: 0px;
  200. right: 0px;
  201. bottom: 0px;
  202. background: @activePulseColor;
  203. border-radius: @barBorderRadius;
  204. animation: progress-active @activePulseDuration @defaultEasing infinite;
  205. }
  206. @keyframes progress-active {
  207. 0% {
  208. opacity: @activePulseMaxOpacity;
  209. width: 0;
  210. }
  211. 90% {
  212. }
  213. 100% {
  214. opacity: 0;
  215. width: 100%;
  216. }
  217. }
  218. /*--------------
  219. Disabled
  220. ---------------*/
  221. .ui.disabled.progress {
  222. opacity: 0.35;
  223. }
  224. .ui.disabled.progress .bar,
  225. .ui.disabled.progress .bar::after {
  226. animation: none !important;
  227. }
  228. /*******************************
  229. Variations
  230. *******************************/
  231. /*--------------
  232. Inverted
  233. ---------------*/
  234. /* bottom attached */
  235. .ui.inverted.progress {
  236. background: @invertedBackground;
  237. border: @invertedBorder;
  238. }
  239. .ui.inverted.progress .bar {
  240. background: @invertedBarBackground;
  241. }
  242. .ui.inverted.progress .bar > .progress {
  243. color: @invertedProgressColor;
  244. }
  245. .ui.inverted.progress > .label {
  246. color: @invertedLabelColor;
  247. }
  248. .ui.inverted.progress.success > .label {
  249. color: @successColor;
  250. }
  251. .ui.inverted.progress.warning > .label {
  252. color: @warningColor;
  253. }
  254. .ui.inverted.progress.error > .label {
  255. color: @errorColor;
  256. }
  257. /*--------------
  258. Attached
  259. ---------------*/
  260. /* bottom attached */
  261. .ui.progress.attached {
  262. background: none transparent;
  263. position: relative;
  264. border: none;
  265. margin: 0em;
  266. }
  267. .ui.progress.attached,
  268. .ui.progress.attached .bar {
  269. display: block;
  270. height: @attachedHeight;
  271. padding: 0px;
  272. overflow: hidden;
  273. border-radius: 0em 0em @attachedBorderRadius @attachedBorderRadius;
  274. }
  275. .ui.progress.attached .bar {
  276. border-radius: 0em;
  277. }
  278. /* top attached */
  279. .ui.progress.top.attached,
  280. .ui.progress.top.attached .bar {
  281. top: 0px;
  282. border-radius: @attachedBorderRadius @attachedBorderRadius 0em 0em;
  283. }
  284. .ui.progress.top.attached .bar {
  285. border-radius: 0em;
  286. }
  287. /*--------------
  288. Colors
  289. ---------------*/
  290. .ui.black.progress .bar {
  291. background-color: @black;
  292. }
  293. .ui.blue.progress .bar {
  294. background-color: @blue;
  295. }
  296. .ui.green.progress .bar {
  297. background-color: @green;
  298. }
  299. .ui.orange.progress .bar {
  300. background-color: @orange;
  301. }
  302. .ui.pink.progress .bar {
  303. background-color: @pink;
  304. }
  305. .ui.purple.progress .bar {
  306. background-color: @purple;
  307. }
  308. .ui.red.progress .bar {
  309. background-color: @red;
  310. }
  311. .ui.teal.progress .bar {
  312. background-color: @teal;
  313. }
  314. .ui.yellow.progress .bar {
  315. background-color: @yellow;
  316. }
  317. .ui.black.inverted.progress .bar {
  318. background-color: @lightBlack;
  319. }
  320. .ui.blue.inverted.progress .bar {
  321. background-color: @lightBlue;
  322. }
  323. .ui.green.inverted.progress .bar {
  324. background-color: @lightGreen;
  325. }
  326. .ui.orange.inverted.progress .bar {
  327. background-color: @lightOrange;
  328. }
  329. .ui.pink.inverted.progress .bar {
  330. background-color: @lightPink;
  331. }
  332. .ui.purple.inverted.progress .bar {
  333. background-color: @lightPurple;
  334. }
  335. .ui.red.inverted.progress .bar {
  336. background-color: @lightRed;
  337. }
  338. .ui.teal.inverted.progress .bar {
  339. background-color: @lightTeal;
  340. }
  341. .ui.yellow.inverted.progress .bar {
  342. background-color: @lightYellow;
  343. }
  344. /*--------------
  345. Sizes
  346. ---------------*/
  347. .ui.small.progress .bar {
  348. height: 14px;
  349. }