Progress.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. /**
  2. * @class Ext.Progress
  3. */
  4. /**
  5. * @var {number}
  6. * The min-height of the ProgressBar
  7. */
  8. $progress-min-height: dynamic(20px);
  9. /**
  10. * @var {number}
  11. * The min-height of the ProgressBar in the {@link Global_CSS#$enable-big big} sizing scheme
  12. */
  13. $progress-min-height-big: dynamic(24px);
  14. /**
  15. * @var {color}
  16. * The border-color of the ProgressBar
  17. */
  18. $progress-border-color: dynamic(null);
  19. /**
  20. * @var {number}
  21. * The border-width of the ProgressBar
  22. */
  23. $progress-border-width: dynamic(null);
  24. /**
  25. * @var {number}
  26. * The border-style of the ProgressBar
  27. */
  28. $progress-border-style: dynamic(null);
  29. /**
  30. * @var {number}
  31. * The border-radius of the ProgressBar
  32. */
  33. $progress-border-radius: dynamic(0);
  34. /**
  35. * @var {color}
  36. * The background-color of the ProgressBar
  37. */
  38. $progress-background-color: dynamic($neutral-highlight-color);
  39. /**
  40. * @var {color}
  41. * The background-color of the ProgressBar's moving element
  42. */
  43. $progress-bar-background-color: dynamic($base-color);
  44. /**
  45. * @var {string/list}
  46. * The background-gradient of the ProgressBar's moving element. Can be either the name of
  47. * a predefined gradient or a list of color stops. Used as the `$type` parameter for
  48. * {@link Global_CSS#background-gradient}.
  49. */
  50. $progress-bar-background-gradient: dynamic(null);
  51. //# fashion replaces $progress-text-color-front
  52. /**
  53. * @var {color}
  54. * The color of the ProgressBar's text when in front of the ProgressBar's moving element
  55. */
  56. $progress-text-front-color: dynamic(#fff);
  57. //# fashion replaces $progress-text-color-back
  58. /**
  59. * @var {color}
  60. * The color of the ProgressBar's text when the ProgressBar's 'moving element is not under it
  61. */
  62. $progress-text-back-color: dynamic(#000);
  63. /**
  64. * @var {string}
  65. * The text-align of the ProgressBar's text
  66. */
  67. $progress-text-text-align: dynamic(center);
  68. /**
  69. * @var {number}
  70. * The font-size of the ProgressBar's text
  71. */
  72. $progress-text-font-size: dynamic(13px);
  73. /**
  74. * @var {number}
  75. * The font-size-big of the ProgressBar's text in the {@link Global_CSS#$enable-big big} sizing scheme
  76. */
  77. $progress-text-font-size-big: dynamic(15px);
  78. /**
  79. * @var {string}
  80. * The font-weight of the ProgressBar's text
  81. */
  82. $progress-text-font-weight: dynamic($font-weight-bold);
  83. /**
  84. * @var {string}
  85. * The font-family of the ProgressBar's text
  86. */
  87. $progress-text-font-family: dynamic($font-family);
  88. /**
  89. * @var {number}
  90. * The line-height of the ProgressBar's text
  91. */
  92. $progress-text-line-height: dynamic($progress-min-height);
  93. /**
  94. * @var {number}
  95. * The line-height-big of the ProgressBar's text in the {@link Global_CSS#$enable-big big} sizing scheme
  96. */
  97. $progress-text-line-height-big: dynamic(32px);
  98. /**
  99. * Creates a visual theme for an Ext.ProgressBar
  100. *
  101. * @param {string} $ui
  102. * The name of the UI being created. Can not included spaces or special punctuation
  103. * (used in CSS class names).
  104. *
  105. * @param {color} [$background-color=$progress-background-color]
  106. * The background-color of the ProgressBar
  107. *
  108. * @param {color} [$bar-background-color=$progress-bar-background-color]
  109. * The background-color of the ProgressBar's moving element
  110. *
  111. * @param {string/list} [$bar-background-gradient=$progress-bar-background-gradient]
  112. * The background-gradient of the ProgressBar's moving element. Can be either the name of
  113. * a predefined gradient or a list of color stops. Used as the `$type` parameter for
  114. * {@link Global_CSS#background-gradient}.
  115. *
  116. * @param {color} [$front-color=$progress-text-front-color]
  117. * The color of the ProgressBar's text when in front of the ProgressBar's moving element
  118. *
  119. * @param {color} [$back-color=$progress-text-back-color]
  120. * The color of the ProgressBar's text when the ProgressBar's 'moving element is not under it
  121. *
  122. * @param {number} [$min-height=$progress-min-height]
  123. * The min-height of the ProgressBar
  124. *
  125. * @param {number} [$min-height-big=$progress-min-height-big]
  126. * The min-height of the ProgressBar in the {@link Global_CSS#$enable-big big} sizing scheme
  127. *
  128. * @param {number} [$border-width=$progress-border-width]
  129. * The border-width of the ProgressBar
  130. *
  131. * @param {color} [$border-color=$progress-border-color]
  132. * The border-color of the ProgressBar
  133. *
  134. * @param {number} [$border-style=$progress-border-style]
  135. * The border-style of the ProgressBar
  136. *
  137. * @param {number} [$border-radius=$progress-border-radius]
  138. * The border-radius of the ProgressBar
  139. *
  140. * @param {string} [$text-text-align=$progress-text-text-align]
  141. * The text-align of the ProgressBar's text
  142. *
  143. * @param {number} [$text-font-size=$progress-text-font-size]
  144. * The font-size of the ProgressBar's text
  145. *
  146. * @param {number} [$text-font-size-big=$progress-text-font-size-big]
  147. * The font-size of the ProgressBar's text in the {@link Global_CSS#$enable-big big} sizing scheme
  148. *
  149. * @param {string} [$text-font-weight=$progress-text-font-weight]
  150. * The font-weight of the ProgressBar's text
  151. *
  152. * @param {string} [$text-font-family=$progress-font-family]
  153. * The font-family of the ProgressBar's text
  154. *
  155. * @param {number} [$text-line-height=$progress-text-line-height]
  156. * The line-height of the ProgressBar's text
  157. *
  158. * @param {number} [$text-line-height-big=$progress-text-line-height-big]
  159. * The line-height of the ProgressBar's text in the {@link Global_CSS#$enable-big big} sizing scheme
  160. *
  161. * @member Ext.Progress
  162. */
  163. @mixin progress-ui(
  164. $ui: null,
  165. $background-color: null,
  166. $bar-background-color: null,
  167. $bar-background-gradient: null,
  168. $front-color: null,
  169. $back-color: null,
  170. $min-height: null,
  171. $min-height-big: null,
  172. $border-width: null,
  173. $border-color: null,
  174. $border-style: null,
  175. $border-radius: null,
  176. $text-text-align: null,
  177. $text-font-size: null,
  178. $text-font-size-big: null,
  179. $text-font-weight: null,
  180. $text-font-family: null,
  181. $text-line-height: null,
  182. $text-line-height-big: null
  183. ){
  184. $ui-suffix: ui-suffix($ui);
  185. .#{$prefix}progress#{$ui-suffix} {
  186. background-color: $background-color;
  187. min-height: $min-height;
  188. color: $front-color;
  189. font-weight: $text-font-weight;
  190. font-size: $text-font-size;
  191. font-family: $text-font-family;
  192. text-align: $text-text-align;
  193. line-height: $text-line-height;
  194. @if $enable-big {
  195. .#{$prefix}big & {
  196. min-height: $min-height-big;
  197. font-size: $text-font-size-big;
  198. line-height: $text-line-height-big;
  199. }
  200. }
  201. @include border($border-width, $border-style, $border-color);
  202. @include border-radius($border-radius);
  203. .#{$prefix}progress-bar {
  204. min-height: $min-height;
  205. @if $enable-big {
  206. .#{$prefix}big & {
  207. min-height: $min-height-big;
  208. }
  209. }
  210. @if $border-radius != 0 {
  211. @include border-radius($border-radius);
  212. }
  213. @if not is-null($bar-background-color) {
  214. @include background-gradient($bar-background-color, $bar-background-gradient);
  215. }
  216. }
  217. .#{$prefix}progress-text-back {
  218. color: $back-color;
  219. }
  220. }
  221. }