progress-bars.less 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. //
  2. // Progress bars
  3. // --------------------------------------------------
  4. // Bar animations
  5. // -------------------------
  6. // WebKit
  7. @-webkit-keyframes progress-bar-stripes {
  8. from { background-position: 40px 0; }
  9. to { background-position: 0 0; }
  10. }
  11. // Spec and IE10+
  12. @keyframes progress-bar-stripes {
  13. from { background-position: 40px 0; }
  14. to { background-position: 0 0; }
  15. }
  16. // Bar itself
  17. // -------------------------
  18. // Outer container
  19. .progress {
  20. overflow: hidden;
  21. height: @line-height-computed;
  22. margin-bottom: @line-height-computed;
  23. background-color: @progress-bg;
  24. border-radius: @border-radius-base;
  25. border: 1px solid @progress-border-color;
  26. .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
  27. }
  28. // Bar of progress
  29. .progress-bar {
  30. float: left;
  31. width: 0%;
  32. height: 100%;
  33. font-size: @font-size-small;
  34. line-height: @line-height-computed;
  35. color: @progress-bar-color;
  36. text-align: center;
  37. background-color: @progress-bar-bg;
  38. .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
  39. .transition(width .6s ease);
  40. }
  41. // Striped bars
  42. .progress-striped .progress-bar {
  43. #gradient > .striped();
  44. background-size: 40px 40px;
  45. }
  46. // Call animation for the active one
  47. .progress.active .progress-bar {
  48. .animation(progress-bar-stripes 2s linear infinite);
  49. }
  50. // Variations
  51. // -------------------------
  52. .progress-bar-success {
  53. .progress-bar-variant(@progress-bar-success-bg);
  54. }
  55. .progress-bar-info {
  56. .progress-bar-variant(@progress-bar-info-bg);
  57. }
  58. .progress-bar-warning {
  59. .progress-bar-variant(@progress-bar-warning-bg);
  60. }
  61. .progress-bar-danger {
  62. .progress-bar-variant(@progress-bar-danger-bg);
  63. }