_progressbars.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. // COMMON
  2. // -----------------------------------------------------------------------------
  3. /* Progress bar overwrite style */
  4. .progress-bar {
  5. background: $color-primary;
  6. }
  7. .progress {
  8. .progress-bar {
  9. box-shadow: none;
  10. border-radius: 4px;
  11. }
  12. }
  13. // DARK
  14. // -----------------------------------------------------------------------------
  15. /* Progress bar default style */
  16. .progress {
  17. background: $pb-default;
  18. box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4) inset;
  19. }
  20. // LIGHT
  21. // -----------------------------------------------------------------------------
  22. /* Progress bar light style */
  23. .progress.light {
  24. background: #f6f7f8;
  25. @include background(linear-gradient($pb-light-line, $pb-light-line 10%, $pb-light 11%));
  26. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
  27. }
  28. // ROUNDEDNESS
  29. // -----------------------------------------------------------------------------
  30. /* Progress bar roundness generic */
  31. .progress-squared {
  32. &,
  33. & .progress-bar {
  34. border-radius: 0 !important;
  35. }
  36. }
  37. // SIZES
  38. // -----------------------------------------------------------------------------
  39. /* Progress bar sizes */
  40. .progress-xs {
  41. height: $pb-xs;
  42. &,
  43. & .progress-bar {
  44. border-radius: $pb-xs;
  45. }
  46. .progress-bar {
  47. direction: ltr !important;
  48. text-indent: -9999px;
  49. }
  50. &.progress-half-rounded {
  51. &,
  52. & .progress-bar {
  53. border-radius: floor($pb-xs / 3);
  54. }
  55. }
  56. &.progress-striped {
  57. .progress-bar {
  58. background-size: 15px 15px;
  59. }
  60. }
  61. }
  62. .progress-sm {
  63. border-radius: $pb-sm;
  64. height: $pb-sm;
  65. &,
  66. & .progress-bar {
  67. border-radius: $pb-sm;
  68. }
  69. .progress-bar {
  70. font-size: 10px;
  71. line-height: $pb-sm;
  72. }
  73. &.progress-half-rounded {
  74. &,
  75. & .progress-bar {
  76. border-radius: floor($pb-sm / 3);
  77. }
  78. }
  79. &.progress-striped {
  80. .progress-bar {
  81. background-size: 20px 20px;
  82. }
  83. }
  84. }
  85. .progress-md {
  86. border-radius: $pb-md;
  87. height: $pb-md;
  88. &,
  89. & .progress-bar {
  90. border-radius: $pb-md;
  91. }
  92. .progress-bar {
  93. font-size: 11px;
  94. line-height: $pb-md;
  95. }
  96. &.progress-half-rounded {
  97. &,
  98. & .progress-bar {
  99. border-radius: floor($pb-md / 3);
  100. }
  101. }
  102. &.progress-striped {
  103. .progress-bar {
  104. background-size: 25px 25px;
  105. }
  106. }
  107. }
  108. .progress-lg {
  109. border-radius: $pb-lg;
  110. height: $pb-lg;
  111. &,
  112. & .progress-bar {
  113. border-radius: $pb-lg;
  114. }
  115. .progress-bar {
  116. line-height: $pb-lg;
  117. }
  118. &.progress-half-rounded {
  119. &,
  120. & .progress-bar {
  121. border-radius: floor($pb-lg / 3);
  122. }
  123. }
  124. &.progress-striped {
  125. .progress-bar {
  126. background-size: 30px 30px;
  127. }
  128. }
  129. }
  130. .progress-xl {
  131. border-radius: $pb-xl;
  132. height: $pb-xl;
  133. &,
  134. & .progress-bar {
  135. border-radius: $pb-xl;
  136. }
  137. .progress-bar {
  138. line-height: $pb-xl;
  139. }
  140. &.progress-half-rounded {
  141. &,
  142. & .progress-bar {
  143. border-radius: floor($pb-xl / 3);
  144. }
  145. }
  146. &.progress-striped {
  147. .progress-bar {
  148. background-size: 35px 35px;
  149. }
  150. }
  151. }
  152. // STATES
  153. // -----------------------------------------------------------------------------
  154. /* Progress bar states */
  155. @each $state in $states {
  156. .progress {
  157. .progress-bar-#{nth($state,1)} {
  158. background-color: #{nth($state,2)};
  159. }
  160. }
  161. }
  162. // CIRCULAR BAR
  163. // -----------------------------------------------------------------------------
  164. .circular-bar {
  165. margin-bottom: 25px;
  166. .circular-bar-chart {
  167. position: relative;
  168. }
  169. strong {
  170. display: block;
  171. font-weight: 600;
  172. font-size: 18px;
  173. line-height: 30px;
  174. position: absolute;
  175. top: 35%;
  176. width: 80%;
  177. left: 10%;
  178. text-align: center;
  179. }
  180. label {
  181. display: block;
  182. font-weight: 100;
  183. font-size: 17px;
  184. line-height: 20px;
  185. position: absolute;
  186. top: 50%;
  187. width: 80%;
  188. left: 10%;
  189. text-align: center;
  190. }
  191. }