_progress.scss 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Disable animation if transitions are disabled
  2. @if $enable-transitions {
  3. @keyframes progress-bar-stripes {
  4. from { background-position: $progress-height 0; }
  5. to { background-position: 0 0; }
  6. }
  7. }
  8. .progress {
  9. display: flex;
  10. height: $progress-height;
  11. overflow: hidden; // force rounded corners by cropping it
  12. @include font-size($progress-font-size);
  13. background-color: $progress-bg;
  14. @include border-radius($progress-border-radius);
  15. @include box-shadow($progress-box-shadow);
  16. }
  17. .progress-bar {
  18. display: flex;
  19. flex-direction: column;
  20. justify-content: center;
  21. color: $progress-bar-color;
  22. text-align: center;
  23. white-space: nowrap;
  24. background-color: $progress-bar-bg;
  25. @include transition($progress-bar-transition);
  26. }
  27. .progress-bar-striped {
  28. @include gradient-striped();
  29. background-size: $progress-height $progress-height;
  30. }
  31. @if $enable-transitions {
  32. .progress-bar-animated {
  33. animation: progress-bar-stripes $progress-bar-animation-timing;
  34. @media (prefers-reduced-motion: reduce) {
  35. animation: none;
  36. }
  37. }
  38. }