progress-bars.less.svn-base 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. // PROGRESS BARS
  2. // -------------
  3. // ANIMATIONS
  4. // ----------
  5. // Webkit
  6. @-webkit-keyframes progress-bar-stripes {
  7. from { background-position: 40px 0; }
  8. to { background-position: 0 0; }
  9. }
  10. // Firefox
  11. @-moz-keyframes progress-bar-stripes {
  12. from { background-position: 40px 0; }
  13. to { background-position: 0 0; }
  14. }
  15. // IE9
  16. @-ms-keyframes progress-bar-stripes {
  17. from { background-position: 40px 0; }
  18. to { background-position: 0 0; }
  19. }
  20. // Opera
  21. @-o-keyframes progress-bar-stripes {
  22. from { background-position: 0 0; }
  23. to { background-position: 40px 0; }
  24. }
  25. // Spec
  26. @keyframes progress-bar-stripes {
  27. from { background-position: 40px 0; }
  28. to { background-position: 0 0; }
  29. }
  30. // THE BARS
  31. // --------
  32. // Outer container
  33. .progress {
  34. overflow: hidden;
  35. height: 18px;
  36. margin-bottom: 18px;
  37. #gradient > .vertical(#f5f5f5, #f9f9f9);
  38. .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
  39. .border-radius(4px);
  40. }
  41. // Bar of progress
  42. .progress .bar {
  43. width: 0%;
  44. height: 18px;
  45. color: @white;
  46. font-size: 12px;
  47. text-align: center;
  48. text-shadow: 0 -1px 0 rgba(0,0,0,.25);
  49. #gradient > .vertical(#149bdf, #0480be);
  50. .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
  51. .box-sizing(border-box);
  52. .transition(width .6s ease);
  53. }
  54. // Striped bars
  55. .progress-striped .bar {
  56. #gradient > .striped(#149bdf);
  57. .background-size(40px 40px);
  58. }
  59. // Call animation for the active one
  60. .progress.active .bar {
  61. -webkit-animation: progress-bar-stripes 2s linear infinite;
  62. -moz-animation: progress-bar-stripes 2s linear infinite;
  63. -ms-animation: progress-bar-stripes 2s linear infinite;
  64. -o-animation: progress-bar-stripes 2s linear infinite;
  65. animation: progress-bar-stripes 2s linear infinite;
  66. }
  67. // COLORS
  68. // ------
  69. // Danger (red)
  70. .progress-danger .bar {
  71. #gradient > .vertical(#ee5f5b, #c43c35);
  72. }
  73. .progress-danger.progress-striped .bar {
  74. #gradient > .striped(#ee5f5b);
  75. }
  76. // Success (green)
  77. .progress-success .bar {
  78. #gradient > .vertical(#62c462, #57a957);
  79. }
  80. .progress-success.progress-striped .bar {
  81. #gradient > .striped(#62c462);
  82. }
  83. // Info (teal)
  84. .progress-info .bar {
  85. #gradient > .vertical(#5bc0de, #339bb9);
  86. }
  87. .progress-info.progress-striped .bar {
  88. #gradient > .striped(#5bc0de);
  89. }
  90. // Warning (orange)
  91. .progress-warning .bar {
  92. #gradient > .vertical(lighten(@orange, 15%), @orange);
  93. }
  94. .progress-warning.progress-striped .bar {
  95. #gradient > .striped(lighten(@orange, 15%));
  96. }