progress.css 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. [data-component="progress"] {
  2. display: flex;
  3. flex-direction: column;
  4. gap: 4px;
  5. [data-slot="progress-header"] {
  6. display: flex;
  7. align-items: center;
  8. justify-content: space-between;
  9. gap: 8px;
  10. }
  11. [data-slot="progress-label"],
  12. [data-slot="progress-value-label"] {
  13. font-family: var(--font-family-sans);
  14. font-size: var(--font-size-small);
  15. font-weight: var(--font-weight-regular);
  16. line-height: var(--line-height-large);
  17. letter-spacing: var(--letter-spacing-normal);
  18. }
  19. [data-slot="progress-label"] {
  20. color: var(--text-base);
  21. }
  22. [data-slot="progress-value-label"] {
  23. color: var(--text-weak);
  24. font-variant-numeric: tabular-nums;
  25. }
  26. [data-slot="progress-track"] {
  27. position: relative;
  28. width: 100%;
  29. height: 8px;
  30. overflow: hidden;
  31. border-radius: 999px;
  32. border: 1px solid var(--border-weak-base);
  33. background-color: var(--surface-base);
  34. }
  35. [data-slot="progress-fill"] {
  36. height: 100%;
  37. width: var(--kb-progress-fill-width);
  38. border-radius: inherit;
  39. background-color: var(--border-active);
  40. transition: width 200ms ease;
  41. }
  42. &[data-indeterminate] [data-slot="progress-fill"] {
  43. width: 35%;
  44. animation: progress-indeterminate 1.3s ease-in-out infinite;
  45. }
  46. }
  47. @keyframes progress-indeterminate {
  48. from {
  49. transform: translateX(-100%);
  50. }
  51. to {
  52. transform: translateX(300%);
  53. }
  54. }