Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

progress-bar.css 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. /*~
  2. name: Progress Bar
  3. category: Progress Bar
  4. elements: ons-progress-bar
  5. markup: |
  6. <div class="progress-bar">
  7. <div class="progress-bar__primary" style="width: 30%"></div>
  8. </div>
  9. <br />
  10. <div class="progress-bar">
  11. <div class="progress-bar__primary" style="width:20%"></div>
  12. <div class="progress-bar__secondary" style="width:76%"></div>
  13. </div>
  14. <br />
  15. <div class="progress-bar progress-bar--indeterminate">
  16. </div>
  17. */
  18. .progress-bar {
  19. position: relative;
  20. height: 2px;
  21. display: block;
  22. width: 100%;
  23. background-color: var(--progress-bar-background-color);
  24. background-clip: padding-box;
  25. margin: 0;
  26. overflow: hidden;
  27. border-radius: 4px;
  28. }
  29. .progress-bar__primary,
  30. .progress-bar__secondary {
  31. position: absolute;
  32. background-color: var(--progress-bar-color);
  33. top: 0;
  34. bottom: 0;
  35. transition: width .3s linear;
  36. z-index: 100;
  37. border-radius: 4px;
  38. }
  39. .progress-bar__secondary {
  40. background-color: var(--progress-bar-secondary-color);
  41. z-index: 0;
  42. }
  43. .progress-bar--indeterminate:before {
  44. content: '';
  45. position: absolute;
  46. background-color: var(--progress-bar-color);
  47. top: 0;
  48. left: 0;
  49. bottom: 0;
  50. will-change: left, right;
  51. animation: progress-bar__indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
  52. border-radius: 4px;
  53. }
  54. .progress-bar--indeterminate:after {
  55. content: '';
  56. position: absolute;
  57. background-color: var(--progress-bar-color);
  58. top: 0;
  59. left: 0;
  60. bottom: 0;
  61. will-change: left, right;
  62. animation: progress-bar__indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  63. animation-delay: 1.15s;
  64. border-radius: 4px;
  65. }
  66. @keyframes progress-bar__indeterminate {
  67. 0% {
  68. left: -35%;
  69. right: 100%;
  70. }
  71. 60% {
  72. left: 100%;
  73. right: -90%;
  74. }
  75. 100% {
  76. left: 100%;
  77. right: -90%;
  78. }
  79. }
  80. @keyframes progress-bar__indeterminate-short {
  81. 0% {
  82. left: -200%;
  83. right: 100%;
  84. }
  85. 60% {
  86. left: 107%;
  87. right: -8%;
  88. }
  89. 100% {
  90. left: 107%;
  91. right: -8%;
  92. }
  93. }
  94. /*~
  95. name: Material Progress Bar
  96. category: Progress Bar
  97. elements: ons-progress-bar
  98. markup: |
  99. <div class="progress-bar progress-bar--material">
  100. <div class="progress-bar__primary progress-bar--material__primary" style="width: 30%"></div>
  101. </div>
  102. <br />
  103. <div class="progress-bar progress-bar--material">
  104. <div class="progress-bar__primary progress-bar--material__primary" style="width:20%"></div>
  105. <div class="progress-bar__secondary progress-bar--material__secondary" style="width:76%"></div>
  106. </div>
  107. <br />
  108. <div class="progress-bar progress-bar--material progress-bar--indeterminate">
  109. </div>
  110. */
  111. .progress-bar--material {
  112. height: 4px;
  113. background-color: var(--material-progress-bar-background-color);
  114. border-radius: 0;
  115. }
  116. .progress-bar--material__primary,
  117. .progress-bar--material__secondary {
  118. background-color: var(--material-progress-bar-primary-color);
  119. border-radius: 0;
  120. }
  121. .progress-bar--material__secondary {
  122. background-color: var(--material-progress-bar-secondary-color);
  123. z-index: 0;
  124. }
  125. .progress-bar--material.progress-bar--indeterminate:before { /* FIXME */
  126. background-color: var(--material-progress-bar-primary-color);
  127. border-radius: 0;
  128. }
  129. .progress-bar--material.progress-bar--indeterminate:after { /* FIXME */
  130. background-color: var(--material-progress-bar-primary-color);
  131. border-radius: 0;
  132. }