_progress-bar.scss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /**
  2. * Creates the base structure of an Ext.ProgressBar
  3. * @member Ext.ProgressBar
  4. */
  5. @mixin extjs-progress {
  6. .#{$prefix}progress {
  7. position: relative;
  8. border-width: $progress-border-width;
  9. border-style: solid;
  10. @include border-radius($progress-border-radius);
  11. overflow: hidden;
  12. height: $progress-height;
  13. }
  14. .#{$prefix}progress-bar {
  15. height: $progress-height - ($progress-border-width * 2);
  16. overflow: hidden;
  17. position: absolute;
  18. width: 0;
  19. @include border-radius($progress-border-radius);
  20. border-right: 1px solid;
  21. border-top: 1px solid;
  22. }
  23. .#{$prefix}progress-text {
  24. overflow: hidden;
  25. position: absolute;
  26. padding: 0 5px;
  27. height: $progress-height - ($progress-border-width * 2);
  28. font-weight: $progress-text-font-weight;
  29. font-size: $progress-text-font-size;
  30. line-height: 16px;
  31. text-align: $progress-text-text-align;
  32. }
  33. .#{$prefix}progress-text-back {
  34. padding-top: 1px;
  35. }
  36. @if $include-ie or $compile-all {
  37. .#{$prefix}strict .#{$prefix}ie7m .#{$prefix}progress {
  38. height: $progress-height - ($progress-border-width * 2);
  39. }
  40. }
  41. @include extjs-progress-ui(
  42. 'default',
  43. $ui-background-color: $progress-background-color,
  44. $ui-border-color: $progress-border-color,
  45. $ui-bar-background-color: $progress-bar-background-color,
  46. $ui-color-front: $progress-text-color-front,
  47. $ui-color-back: $progress-text-color-back
  48. )
  49. }
  50. /**
  51. * Creates a visual theme for an Ext.ProgressBar
  52. * @member Ext.ProgressBar
  53. */
  54. @mixin extjs-progress-ui(
  55. $ui-label,
  56. $ui-base-color: null,
  57. $ui-border-color: null,
  58. $ui-background-color: null,
  59. $ui-bar-background-color: null,
  60. $ui-bar-background-gradient: glossy,
  61. $ui-color-front: null,
  62. $ui-color-back: null
  63. ){
  64. @if $ui-base-color != null {
  65. @if $ui-border-color == null { $ui-border-color: $ui-base-color; }
  66. @if $ui-bar-background-color == null { $ui-bar-background-color: $ui-base-color; }
  67. @if $ui-color-front == null { $ui-color-front: lighten($ui-base-color, 60); }
  68. @if $ui-color-back == null { $ui-color-back: darken($ui-base-color, 60); }
  69. }
  70. .#{$prefix}progress-#{$ui-label} {
  71. @if $ui-border-color != null { border-color: $ui-border-color; }
  72. .#{$prefix}progress-bar {
  73. @if $ui-border-color != null { border-right-color: $ui-border-color; }
  74. @if $ui-border-color != null { border-top-color: lighten($ui-border-color, 25); }
  75. @if $ui-bar-background-color != null { @include background-gradient($ui-bar-background-color, $ui-bar-background-gradient); }
  76. }
  77. .#{$prefix}progress-text {
  78. @if $ui-color-front != null { color: $ui-color-front; }
  79. }
  80. .#{$prefix}progress-text-back {
  81. @if $ui-color-back != null { color: $ui-color-back; }
  82. }
  83. }
  84. @if $ui-background-color != null {
  85. @if not $supports-gradients or $compile-all {
  86. .#{$prefix}nlg {
  87. .#{$prefix}progress-#{$ui-label} {
  88. .#{$prefix}progress-bar {
  89. background: repeat-x;
  90. background-image: theme-background-image($theme-name, 'progress/progress-#{$ui-label}-bg.gif');
  91. }
  92. }
  93. }
  94. }
  95. }
  96. }