progress-bars.less 1.8 KB

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